G
Gavvvvvin
Guest
Okay so in my prgram the user has to enter a number which is to be used in a calculation. How do I make the program check whether or not a number has been entered instead of say text?
Students helping students, join us in improving Bored of Studies by donating and supporting future students!
Simple. Use the inbuilt function "IsNumeric"Gavvvvvin said:Okay so in my prgram the user has to enter a number which is to be used in a calculation. How do I make the program check whether or not a number has been entered instead of say text?
If IsNumeric(Text1) = True Then
Msgbox Text1 + 1
Else If
Msgbox "Please enter a number."
End If
I would do that in assembly. Certainly not in VB!Musk said:if you want you cna use error handlers
I thought it was premature optimization?redslert said:omg goto statement
that's the root of all evil