Re: IsNumeric Does not Work!

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Programmer wrote:
> Hi,
> When I was looking my codes and I Found something causes some errors.
> some dimesions if it contains some value like that
>
> Dim MyDimension
> MyDimension="2800+"
> Msgbox Isnumeric(MyDimension)
> MyDimension="2800-"
> Msgbox Isnumeric(MyDimension)
>
> Msgbox Says that all of them are True , these situations indicate
> that These Values are Numeric

They are.

> I cannot Understand This value how can it be Numeric.
> If I need a numeric value , If I test with Isnumeric it causes
> problem for me.
>
> Do you know Why It is numeric?

Negative and positive signs at the end of a number are perfectly acceptable
formats. If you don't like that, then you will need to roll your own
function to test. Rick Rothstein has his own function that works better
than the IsNumeric, so if he is along here sometime, he may tell you.
Otherwise you could search for it.

http://www.google.com/url?sa=D&q=http://groups.google.com/groups%3Fq%3Disnum
eric%2Brick%2Brothstein



--
Regards,

Michael Cole


.



Relevant Pages