Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Module Error

I have renamed all of my modules and moved macros into the corresponding
module that best catagorizes them. Now I keep getting errors.

Expected variable or procedure, not module

When this error comes up the word sheets is always highlighted. Why is this
happening?

Any Ideas?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 153
Default Module Error

Show a sample macro where this is happening.

DaveU

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default Module Error

You didn't name one of your modules "Sheets" did you?? When renaming
modules it is important not to use any terms already used by VBA and
also not to use a name that you have also used for a macro, function or
userform.

Regards
Rowan

justaguyfromky wrote:
I have renamed all of my modules and moved macros into the corresponding
module that best catagorizes them. Now I keep getting errors.

Expected variable or procedure, not module

When this error comes up the word sheets is always highlighted. Why is this
happening?

Any Ideas?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default Module Error

Assuming this to be the problem, then this is one of the reasons I suggested
in my original response prefacing your module names with m or mod...

mSheets or modSheets are perfectly acceptable names that will not conflict
with any reserved words in VBA. I probably should have mentioned that in my
first post.
--
HTH...

Jim Thomlinson


"Rowan Drummond" wrote:

You didn't name one of your modules "Sheets" did you?? When renaming
modules it is important not to use any terms already used by VBA and
also not to use a name that you have also used for a macro, function or
userform.

Regards
Rowan

justaguyfromky wrote:
I have renamed all of my modules and moved macros into the corresponding
module that best catagorizes them. Now I keep getting errors.

Expected variable or procedure, not module

When this error comes up the word sheets is always highlighted. Why is this
happening?

Any Ideas?


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Module Error

Actually, I figured it out on my own. Just as Rowan guessed, I named one of
the modules "Sheets". It just dawned on me when everytime I used a macro,
sheets was highlighted. I love excel, every day is a learning experience.
Thanks for the speedy replies anyway. I have learned more from this forum
than I have anywhere else.



"justaguyfromky" wrote:

I have renamed all of my modules and moved macros into the corresponding
module that best catagorizes them. Now I keep getting errors.

Expected variable or procedure, not module

When this error comes up the word sheets is always highlighted. Why is this
happening?

Any Ideas?



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Module Error

Where can I view a compiled list of reserved words?
--
Thank you for your time.
Windows XP
Office 2002


"Jim Thomlinson" wrote:

Assuming this to be the problem, then this is one of the reasons I suggested
in my original response prefacing your module names with m or mod...

mSheets or modSheets are perfectly acceptable names that will not conflict
with any reserved words in VBA. I probably should have mentioned that in my
first post.
--
HTH...

Jim Thomlinson


"Rowan Drummond" wrote:

You didn't name one of your modules "Sheets" did you?? When renaming
modules it is important not to use any terms already used by VBA and
also not to use a name that you have also used for a macro, function or
userform.

Regards
Rowan

justaguyfromky wrote:
I have renamed all of my modules and moved macros into the corresponding
module that best catagorizes them. Now I keep getting errors.

Expected variable or procedure, not module

When this error comes up the word sheets is always highlighted. Why is this
happening?

Any Ideas?


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Module Error



in the VBE
press the help button (dont use the AskAQuestion box)

in the TOC
select Microsoft Visual Basic Documentation
select Visual Basic Language Reference
select Keywords

et voilá
--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Where can I view a compiled list of reserved words?

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
Excel Module error Phanindran U[_2_] Excel Discussion (Misc queries) 1 August 20th 07 09:09 AM
compile error in hidden module Gary M Excel Discussion (Misc queries) 0 July 31st 07 09:22 PM
error "module not found" Amit Excel Discussion (Misc queries) 1 May 13th 05 01:24 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 03:25 AM.

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

About Us

"It's about Microsoft Excel"