Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 413
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default 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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default 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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 413
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile error in hidden module: ThisWorkbook Graeme Setting up and Configuration of Excel 3 April 4th 08 03:33 AM
Workbook_Open in ThisWorkbook.module Bob Barnes Excel Discussion (Misc queries) 1 February 12th 08 07:52 PM
Compile error in hidden module: ThisWorkbook Lloyd Excel Discussion (Misc queries) 1 May 27th 05 11:39 PM
Compile error in hidden module: ThisWorkbook Peo Sjoblom Excel Discussion (Misc queries) 0 May 27th 05 09:50 PM
Call Private Function from ThisWorkbook module Beto[_3_] Excel Programming 3 February 25th 04 01:36 PM


All times are GMT +1. The time now is 03:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"