Hi im new here and am at beginer level vb.net. I have two basic questions on relating to upgrading code from vb6 to .net:
I have what seems to be text box array...
in the old code they are referenced as Text1(i).Text
to facilitate looping with an If statement
but i cannot make this work in vb.net
example code
For i = 0 To 4
If Not IsNumeric(Text1(i).Text) Then
MsgBox Character(i, 1)
Exit Sub
End If
If Text1(i).Text = "" Then
MsgBox Character(i, 0)
Exit Sub
End If
Next
this code iterates thru 5 text boxes to check that the value entered is numeric and also that there are no blank spaces.
How would i put this into .net as it doesn't seem possible to hold the text boxes in array.
many thanks for any suggestions!
I have what seems to be text box array...
in the old code they are referenced as Text1(i).Text
to facilitate looping with an If statement
but i cannot make this work in vb.net
example code
For i = 0 To 4
If Not IsNumeric(Text1(i).Text) Then
MsgBox Character(i, 1)
Exit Sub
End If
If Text1(i).Text = "" Then
MsgBox Character(i, 0)
Exit Sub
End If
Next
this code iterates thru 5 text boxes to check that the value entered is numeric and also that there are no blank spaces.
How would i put this into .net as it doesn't seem possible to hold the text boxes in array.
many thanks for any suggestions!