Anybody know a simple routine that checks whether a string is valid number or not?
Any help would be good.
Printable View
Anybody know a simple routine that checks whether a string is valid number or not?
Any help would be good.
will do the job!Code:MsgBox IsNumeric(MyStr)
Hi,
Use VB's IsNumeric function.
Example:
Hope this helpsCode:Dim strTemp As String
dim IsAString As Boolean
strTemp = "1j2k34"
IsAString = IsNumeric(strTemp) 'Returns False
strTemp = "8656"
IsAString = IsNumeric(strTemp) 'Returns True
Shaun
French:
Oui, monsieur, il sais:
Parlez-vous français où anglais?Code:IsNumeric("String")
Chinese:
Huede, xianshong, zheshzaidingshong.
Spanish:
Sí, señor.
English:
Yes, mister.