I loop over string variable data
which may have integer numeric value, like "123"
. If this string variable has numeric value, I want to indicate it and thought to use some like this:
If IsNumeric(CInt(data)) Then
WScript.Echo "Number"
Else
WScript.Echo "String"
End If
But CInt()
raises error every time data
variable can't be converted to integer:
Type mismatch: 'CInt'
How can I indicate if string has integer value in vbscript?