View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default Application.WorksheetFunction problem

if you want to test for a number first
Sub iseven()
myrange = Range("I11")
If IsNumeric(myrange) Then
If myrange Mod 2 = 0 Then MsgBox "even"
End If
End Sub

--
Don Guillett
SalesAid Software

"Don Guillett" wrote in message
...
try

If Range("I11") Mod 2 = 0 Then MsgBox "even"

--
Don Guillett
SalesAid Software

"Gary''s Student" wrote in

message
...
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