jaybee33
Member
hey, this is my first post here, but last night i was writing some code for my first program, i dont know how this worked, but i put a number in my program, but when i clicked the final button to display my results "as string" it still showeed the number?? here is the code i wrote, is relativley simple, but the theory doesnt make scence to me
Basicly its a box with 3 lables, (first name, surname and age), 3 text boxes (for the user to input this info) and a button at the bottom called "display in message box" so when i click the button, it displays the users input in the form as a message box.
here is the code, (no screen shots sorry, im at work atm)
==========================
what i dont get is if i said to VB that vaiable "Complete" was STRING then howcome it still displays the AGE ..... which is an Integer (a number) not a string????
thanks guys.
John
Basicly its a box with 3 lables, (first name, surname and age), 3 text boxes (for the user to input this info) and a button at the bottom called "display in message box" so when i click the button, it displays the users input in the form as a message box.
here is the code, (no screen shots sorry, im at work atm)
VB.NET:
Dim firstname As String
Dim surname As String
Dim age As Integer
Dim fullname As String
Dim Complete As String
firstname = textbox1.text
surname = textbox2.text
age = howold.text
fullname = firstname & " " & surname
complete = fullname & " " & age
msgbox (complete)
==========================
what i dont get is if i said to VB that vaiable "Complete" was STRING then howcome it still displays the AGE ..... which is an Integer (a number) not a string????
thanks guys.
John