ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Module Error (https://www.excelbanter.com/excel-programming/348269-module-error.html)

justaguyfromky

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?

Dave Unger

Module Error
 
Show a sample macro where this is happening.

DaveU


Rowan Drummond[_3_]

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?


Jim Thomlinson[_4_]

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?



justaguyfromky

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?


James Kendall

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?



keepITcool

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?



All times are GMT +1. The time now is 12:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com