How to check that user enters only digits
IsNumeric() function returns true for a string, which can me converted to number, like "1 2", "1e2". But if you need to check that string contains only digits? The simplest way I think is:
If strVar Like String(Len(strVar),"#") then
'Only numbers!
End If
Labels: VBA