Re: IsNumeric not returning correctly



"Robert Morley" <rmorley@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:ejH$SYNLGHA.3276@xxxxxxxxxxxxxxxxxxxx
This is a special case. IsNumeric will correctly interpret scientific
notation, or VB's version of it, so 1E6 gets interpreted as 1,000,000
(1 * 10 ^ 6). Since that's numeric, IsNumeric returns True.

The only way I can think of to get around this is to do something
like this:

Private Function IsReallyNumeric(ByVal s as String)

As Boolean

IsReallyNumeric = IsNumeric(Replace(s,"e","z"))
End Function

You'd have to replace "d" as well and make the replace case-insensitive
since D and E are also 'numeric' in these cases. And while the problem is
the same in both VB and Visual Fred the syntax for the solution is going to
be different which is why the question should be asked in the right
newsgroup.

--
Reply to the group so all can participate
VB.Net: "Fool me once..."

.