What may cause macro modules to be created by accident?

H

herrdue

I've seen numerous posts here about how to resolve nagging macro
warnings in workbooks where the user claims there are no macros. I
understand how to erradicate them. However, I'm curious as to what
this group believes are the reasons as to why these modules are
created in the first place. I saw in one post, someone suggested it
could happen after right clicking on a spreadsheet tab and selecting
"view code" by accident. Yet, if I try that, no modules are created,
so I can't see how that would be the culprit. Another explanation
would be if someone went so far as to begin recording a macro by
accident and then promptly bailing out, and yes, I can see how that
would generate a module. But it seems many foks feel these macros can
appear without these types of activities. Are there any other actions
that might cause unwanted modules to appear...things to caution users
about during training? Thanks in advance for your input.
 
D

Dave Peterson

If you have the option to force declarations of variables turned on, then
rightclicking on a worksheet tab and selecting view code could cause "option
explicit" to be added to the worksheet module--not a general module.

That's enough to cause the warning the next time the workbook is opened.
 
H

herrdue

If you have the option to force declarations of variables turned on, then
rightclicking on a worksheet tab and selecting view code could cause "option
explicit" to be added to the worksheet module--not a general module.

That's enough to cause the warning the next time the workbook is opened.
Thanks Dave! I appreciate your time to reply with a great answer.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top