View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
David David is offline
external usenet poster
 
Posts: 1,560
Default VBA WorksheetFunction problem

Hi Jeff,
I don't get an error, but I do not get the correct answer either. I am using
V2003. I will kep an eye on this question, since mine is not working
correctly either.


"Jeff Wright" wrote:

Greetings!

Can anyone tell me why I get a runtime error (1004) when running the simple
routine below? The data from B1 to B4 is 1, 2, 3, 4. The remainder of the
column is empty.

Sub cmdCountRows_Click()
Dim Leap As Integer
Leap = Application.WorksheetFunction.CountA("B1:B4")
MsgBox Leap
End Sub

Thanks for your help!

Jeff