I have the tipical "check if valid" in a TextFiled
How can I Check if a String is a number... (int or double)
If isNotNumber(MyString) Then
ThisTextField.SetFocus()
Printable View
I have the tipical "check if valid" in a TextFiled
How can I Check if a String is a number... (int or double)
If isNotNumber(MyString) Then
ThisTextField.SetFocus()
This will check that any text is a number:
VB Code:
If Not isNumeric(MyString) Then ThisTextField.SetFocus() End If
and this will do the same, plus make sure that something has been entered (the above will allow empty text)
VB Code:
If (Not isNumeric(MyString)) Or (MyString = "") Then ThisTextField.SetFocus() End If