Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
mps mps is offline
external usenet poster
 
Posts: 12
Default Disable macros in Workbooks.open

In a macro in Workbook_A, I call workbooks.open("Workbook_B"). Although I am
(obviously) running macros in Workbook_A, I don't want to run Workbook_B's
startup macros when it is opened (but they are). How can I disable macros in
the load of Workbook_B?

Thanks,

Mike
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Disable macros in Workbooks.open

application.EnableEvents = False
workbooks.Open "Workbook_b.xls"
application.EnableEvents = True

--
Regards,
Tom Ogilvy


"mps" wrote:

In a macro in Workbook_A, I call workbooks.open("Workbook_B"). Although I am
(obviously) running macros in Workbook_A, I don't want to run Workbook_B's
startup macros when it is opened (but they are). How can I disable macros in
the load of Workbook_B?

Thanks,

Mike

  #3   Report Post  
Posted to microsoft.public.excel.programming
mps mps is offline
external usenet poster
 
Posts: 12
Default Disable macros in Workbooks.open

Tom,
Perfect, thanks!

Mike

"Tom Ogilvy" wrote:

application.EnableEvents = False
workbooks.Open "Workbook_b.xls"
application.EnableEvents = True

--
Regards,
Tom Ogilvy


"mps" wrote:

In a macro in Workbook_A, I call workbooks.open("Workbook_B"). Although I am
(obviously) running macros in Workbook_A, I don't want to run Workbook_B's
startup macros when it is opened (but they are). How can I disable macros in
the load of Workbook_B?

Thanks,

Mike

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
Cause workbook to fail to open if user opts to disable macros I Believe Excel Programming 10 July 5th 07 09:50 PM
How can I disable macros after the initial open? Troy Excel Discussion (Misc queries) 4 February 13th 06 03:38 PM
Open Worbook and Disable Macros DMc2005 Excel Discussion (Misc queries) 4 October 1st 05 07:23 PM
Open Worbook and Disable Macros DMc2005 Excel Programming 4 October 1st 05 07:23 PM
Disable Button when no workbooks are open. Beto[_3_] Excel Programming 16 February 27th 04 07:30 PM


All times are GMT +1. The time now is 08:48 PM.

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"