ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Empty ThisWorkbook module, but Macro warning problem (https://www.excelbanter.com/excel-programming/302720-empty-thisworkbook-module-but-macro-warning-problem.html)

Stuart[_5_]

Empty ThisWorkbook module, but Macro warning problem
 
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.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.710 / Virus Database: 466 - Release Date: 23/06/2004



Norman Jones

Empty ThisWorkbook module, but Macro warning problem
 
Hi Stuart,


You need to remove the empty module.


--
Regards,
Norman


"Stuart" wrote in message
...
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.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.710 / Virus Database: 466 - Release Date: 23/06/2004





Norman Jones

Empty ThisWorkbook module, but Macro warning problem
 
Hi Stuart,

Apologies - I failed to read 'ThisWorkbook' Module!

Try Debra Dalgleish's notes:

http://www.contextures.com/xlfaqMac.html#NoMacros


---
Regards,
Norman.



"Stuart" wrote in message
...
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.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.710 / Virus Database: 466 - Release Date: 23/06/2004





Stuart[_5_]

Empty ThisWorkbook module, but Macro warning problem
 
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.

"Norman Jones" wrote in message
...
Hi Stuart,

Apologies - I failed to read 'ThisWorkbook' Module!

Try Debra Dalgleish's notes:

http://www.contextures.com/xlfaqMac.html#NoMacros


---
Regards,
Norman.



"Stuart" wrote in message
...
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.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.710 / Virus Database: 466 - Release Date: 23/06/2004






---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.710 / Virus Database: 466 - Release Date: 23/06/2004




All times are GMT +1. The time now is 10:26 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com