View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Casey[_8_] Casey[_8_] is offline
external usenet poster
 
Posts: 1
Default Compile error using Call

Thanks in advance for any help. I learn so much from all the grea
people and their ideas here, even though most of the time I'm just
silent observer, just wanted to thank all the MVP's and gurus of VB
for the education. Now the problem.

I have procedures activated by command buttons, which hide and unhid
rows meeting a certain criteria. I just show the "Hide side" becaus
the "unhide" is very similar and I'm getting the same error message o
both.

The buttons call the procedure from a module.

Private Sub CommandButton3_Click()

Call HideEmptyRows

End Sub

Here is the code from the module

Sub HideEmptyRows()
'If a particular cell within the P_L_Range was active'
'the corresponding row was hidden whether it met the criteria below o
not,'
'this was my fix to select E1500.'

Range("E1500").Select

LastRow = ActiveSheet.Range("P_L_Range").Row - 1
ActiveSheet.Range("P_L_Range").Rows.Count
Application.ScreenUpdating = False
For r = LastRow To 1 Step -1
If Application.WorksheetFunction.CountA(Rows(r)) = 3 _
Then Rows(r).Select
Selection.EntireRow.Hidden = True
Next r
'Next bit of code takes user back to top of page.'
ActiveWindow.ScrollRow = 3
Range("D5").Select
End Sub

Here is the error I'm getting

Compile error:
Expected varible or procedure, not modul

--
Message posted from http://www.ExcelForum.com