if char is number
? isnumeric(".")
False
? isnumeric("5")
True
so
if Isnumeric(char) then
msgbox "It can be treated as a number"
else
msgbox "it can't be treated as a number"
End if
--
Regards,
Tom Ogilvy
"Roman Töngi" wrote in message
...
How can I determine whether a char is a digit or a period by menas of VBA?
Example:
If char = 0 or char = 1 ... or char = 9 or char = "." Then
...
There is sure to be a shorter solution.
Regards,
Roman
|