you can use the isnumeric() function
if isnumeric(string) then
else
end if
Declare Public Function NumCheck(Value as Variant) As Boolean
Dim I as Integer
NumCheck = 1
For I = 1 To Len(Value)
If Mid(Value, I, 1) < '0' Or Mid(Value, I, 1) > '9' Then
NumCheck = 0
Exit Function
Next I
Then execute by using:
If NumCheck(myValue) = 0 Then ' not all numeric
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
15 Experts available now in Live!