ThisWorkbook module question

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.
 
F

Frank Kabel

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)
 
S

Stuart

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.
 
F

Frank Kabel

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
 

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