Good point. I probably forgot how it works exactly. The bottom line is that
this function can return true in some cases even if the "number" is not
strictly a number so your best bet is to use another function that does a
more strict checking...
P.S. I finally gave it a try using the following code :
Dim a() As String = {"&h5", "5?", "5 6"} ' Use your own currency
symbol instead of ?
Dim r As Integer
For i As Integer = 0 To UBound(a)
Debug.WriteLine(String.Format("{0},{1},{2}", a(i),
IsNumeric(a(i)), Integer.TryParse(a(i), r)))
Next
Results are :
&h5,True,False
5?,True,False
5 6,True,False
As you can see IsNumeric is not as picky than TryParse (and was already in
VB/VBA so they likely kept this unchanged for compatibility)...