View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Doug Glancy Doug Glancy is offline
external usenet poster
 
Posts: 770
Default IsNumber in VBA (not IsNumeric)

Gary"s Student,

I forget the explanation for why, but it's something to do with Value and
Dates. If you change Value to Value2 it will work (or leave off the
property altogether). If you Google Dates and Value2 I think you'll find
the explanation in a past post in this group.

hth,

Doug

"Gary''s Student" wrote in message
...
If I enter a date in A1, say 5/10/2006, =ISNUMBER(A1) always returns
TRUE.

Why does:

=wtf(A1) return FALSE for:

Function wtf(r As Range) As Boolean
wtf = Application.WorksheetFunction.IsNumber(r.Value)
End Function

??
--
Gary's Student