To make the above code work with variants and negative numbers, there has to be some changes:
VB Code:
Dim V As Variant V = -1500 Select Case V Case "-" To "9" MsgBox "Number" Case Else MsgBox "No Number" End Select
But now it lets through strings that begin with a "/"..
Kinda surprising that "Case True, False" works so well..




Reply With Quote