Unlike C++, VB does not provide is the option to go onto the next item in the loop. You can get around this by using a label and a Goto statement:
For intCount = 1 To 10 Step 1
lngResult = Val(InputBox ("Enter a number"))
If > lngBig Then
'// New number is bigger
lngBig = lngResult
'// go onto next loop
GoTo NextLoop
End If
Msgbox "That number is less than " & lngBig
NextLoop:
Next intCount
Comments