Microsoft Excel
--
Questions
--
Followers
Top Experts
Excel VBA code location, ThisWorkbook vs. Module
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
ASKER CERTIFIED SOLUTION
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Patrick
Does that work for subs declared Private?
Does that work for subs declared Private?
imnorie,
>Does that work for subs declared Private?
By 'that' I assume you mean referencing the sub by the code pane it is in.
No, it doesn't work for 'Private' subs.
Patrick
>Does that work for subs declared Private?
By 'that' I assume you mean referencing the sub by the code pane it is in.
No, it doesn't work for 'Private' subs.
Patrick
Thought so, just wanted to check.
Sorry for not being clear.
Sorry for not being clear.






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
The main point where to put code is security issue of code
If you want hide (protect) code from user - create separate .XLA file and keep code in it's modules (protected by password)
So user will be able to create his own macro but don't have access to yours
If you want hide (protect) code from user - create separate .XLA file and keep code in it's modules (protected by password)
So user will be able to create his own macro but don't have access to yours
The main point of where to put code might be to put it somewhere where it will work.:)
multiple good answers

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
Steve - Thanks for the points - Patrick
Microsoft Excel
--
Questions
--
Followers
Top Experts
Microsoft Excel topics include formulas, formatting, VBA macros and user-defined functions, and everything else related to the spreadsheet user interface, including error messages.
