View Single Post
  #14   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Application.WorksheetFunction problem

You can find which ones work by using the object browser in the VBE. Select
"worksheetfunction" in the left window and you will see the supported
functions in the right.

--
Regards,
Tom Ogilvy


"Gary''s Student" wrote in message
...
Thank you Dana:

For my simple applications, either method works. I learned 3 things:

1. just adding-in the Analysis ToolPak is not enough, VBA needs its own
reference
2. some worksheet functions like ROMAN() will work with
Application.WorksheetFunction
3. other worksheet functions like ISBLANK() are only for the worksheet
--
Gary's Student


"Dana DeLouis" wrote:

I'll use Don's approach.


It's an excellent idea, but just be aware of some bugs, I mean

limitations,
err... features of Excel...

Sub Demo()
[A1] = 2147483648#
If Range("A1") Mod 2 = 0 Then MsgBox "Even"
End Sub

Note that the number 2147483647 in binary is 31 1's.
--
Dana DeLouis
Win XP & Office 2003


"Gary''s Student" wrote in

message
...
Thanks all.

I'll use Don's approach. I still can't get Tm's approach to work. Do

I
have to enable worksheet functions in VBA like the Analysis ToolPak
--
Gary''s Student


"Gary''s Student" wrote:

I am trying to call ISEVEN() from VBA with:

Dim b as Boolean
b = Application.WorksheetFunction.ISEVEN(A1)

I am raising "Object doesn't support this Property or Method"

What is the correct syntax?
--
Gary''s Student