Empty ThisWorkbook module, but Macro warning problem

S

Stuart

A workbook is opened. User makes their alterations then
saves with a new name.
Before the save, code is removed from the ThisWorkbook
module (there was no other code, no other empty module).

When the newly named book is opened, the macro warning
is shown. If I save the workbook again, close, then reopen it,
then the warning appears to not display.

I believe this is normal behaviour?

Is there a way to achieve the removal of this 'redundant'
macro warning via code....so that when the user opens their
new workbook for the first time, there is no warning, or do
they have to go through the open/save/close/reopen
routine every time they create a new book, please?

Regards.
 
S

Stuart

Many thanks.
Chip says:
You cannot delete the ThisWorkbook code module,
or a sheet code module, or a chart code module.

So the empty ThisWorkbook module must remain.

What if I move all the code to a standard module, and
then (when redundant, remove that)?
Would I lose the functionality of all the Workbook Event
code I'm using?
I've never been too sure what is/are the particular value(s)
of the ThisWorkbook module.

Regards.
 

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