ThisWorkbook module question

  • Thread starter Thread starter Stuart
  • Start date Start date
S

Stuart

A file with code in the ThisWorkbook module (no other module exists)
is opened. It contains a single sheet.
The contents of the single sheet are copied to a sheet in a new workbook.
The new book is saved, closed and then reopened.

Can the macro warning message be suppressed?

I believe the ThisWorkbook module cannot be deleted?

Could I save the stripped workbook in another format?

Regards.
 
Hi
then do you get the macro warning?
for the new workbook or the existing one.
For the existing one (with code in ThisWorkbook) no chance besided
setting the security level to 'Low' (or signing your code)
 
Results with the new workbook are not consistent.
Generally there is no warning when the new book
is opened.

Whether there is a warning or not, the only entry in
the new book's ThisWorkbook module is
"Option Explicit".

Obviously for the 'old' workbook which retains code,
I'm always getting the warning. That is fine/expected.

Why sometimes a warning when the module is empty.

Regards.
 
Hi
even with only this entry 'Option Explicit' you get this warning. The
module has to be completely empty (and no standard module shall exist).
So deleting 'Option Explicit' will remove the macro warning
 
Back
Top