In the absence of reference materials which are still somewhere over the Pacific, I'm trying to teach myself how to implement the simplest tasks without much luck.
I have created a form and on that form have placed a TextBox. Now I go to the underlying code for this control and want to display a type LONG variable in the TextBox.
Two issues here: the TextBox will not display a Long variable; this I have apparently overcome using ToString. But how do I get the resultant variable text data into the TextBox control on the form No, I don't want to use MsgBox!
Like that other large Corporation (whose name will not be mentioned), you will only find what you want in the documentation if you know precisely what to search for; in my case the name of the function to accomplish the task.
Hope there is someone out there who can help this dummy.

Display a variable in a TextBox - Simple task if I new how
chris can surf
hi,
the best thing is to post part of your code, anyway here its a form that contain 3 textbox and a button the first 2 textboxs display the long variables
the third textbox will convert the textbox to long and calculate it and display it as text when you click on the button
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim var1, var2 As Longvar1 = 44646467687546
var2 = 64643216876432
TextBox1.Text = var1.ToString
TextBox2.Text = var2.ToString
End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.ClickTextBox3.Text = (
Long.Parse(TextBox1.Text) + Long.Parse(TextBox2.Text)).ToString End Subhope it was helpfull
wgkwvl
Ted69
Thank you Shakalama, your code construct:
"TextBox1.Text = Var1.ToString", was what I was after.
I tried this, but the TextBox remained empty when I ran the application. Then I realised I had the code in the TextBox1.Text_Changed sub, created by Designer and that it should be triggered (in this case) by the Load Event. A few tweaks to my code and it's running fine now. Many thanks pal.
Coincidentally, my reference books have just this minute arrived from Amazon!
Why does it always happen to me this way lol
Maarten van Stam
kim aldis
hi, Allen
you are most wellcome
best regards