I have a question. In trying to do an if statement on a value thats suppose to be numeric, how do I test for that condition
Like in a string test:
If mystring <> "" then
I want to accomplsih the same with an integer or double to see if it has a number assigned to it or not.
Thanks,
Tom

Check if type is numeric or not?
Lester Leonard Go
If you have a string and want to check if it represents a number, use Integer.TryParse or Double.TryParse. If the string is a number, that value will be assigned to the out parameter.
Stephen Weatherford MS
Thanks.
Julie Brazier
Otherwise, you could override the default value by declaring your variable as Dim x As Integer = -1
rfolk73
Are you asking how to check if a number has anything but zero in it
As numbers (integers, doubles, floats, etc) are value types, they always have a value assigned to them.
For example, the number variable below has the default value of 0 and hence the first message box will be displayed.
Dim number as Integer;
If number = 0 Then
MessageBox.Show("number is zero!.")
Else
MessageBox.Show("number is not zero!.")
End if
lauch
Good point, just fixed it. That will teach me for typing code without testing it.
coozdrm
Hi,
You seem to have mixed up C# and VB in the code snippet!
It should be as follows in VB:
Dim number As Integer
If (number = 0) Then
MessageBox.Show("number is zero!.")
Else
MessageBox.Show("number is not zero!.")
End If
Regards,
Vikram