Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Compile error using Call

I was able to duplicate this error when I put a subroutine into a modul
of the same name. What I did:

In a worksheets code:

Sub test()
Call Bubba
End sub

In a module:
Sub Bubba()
Msgbox "HI"
End Sub

All worked ok here until i went to the properties of the module an
changed its name to Bubba. I would have thought that you could no
name a subroutine the same as a module, but apparently you can...
Check if this is your problem.



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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Compile error using Call

kkknie,
That was the problem. Thank you so much. I want to apoligize to th
forum for my inadvertant posting of my question 3 times. It wa
unintentional. Again many thanks.
Case

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Solver - error - Compile Error Nina Excel Discussion (Misc queries) 0 August 19th 08 09:41 PM
help with this error-Compile error: cant find project or library JackR Excel Discussion (Misc queries) 2 June 10th 06 09:09 PM
How do I get rid of "Compile error in hidden module" error message David Excel Discussion (Misc queries) 4 January 21st 05 11:39 PM
Compile error in hidden module error Melissa Zebrowski Excel Programming 3 February 20th 04 01:29 PM


All times are GMT +1. The time now is 11:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"