PC Review


Reply
Thread Tools Rate Thread

Disable macros in Workbooks.open

 
 
=?Utf-8?B?bXBz?=
Guest
Posts: n/a
 
      4th Oct 2006
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 With Quote
 
 
 
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      4th Oct 2006
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 With Quote
 
=?Utf-8?B?bXBz?=
Guest
Posts: n/a
 
      5th Oct 2006
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
open file with macros disable Alberto Ast Microsoft Excel Programming 1 26th Oct 2009 10:12 PM
Sharing variables between the macros in 2 open excel workbooks. MAJOR TOM Microsoft Excel Programming 1 1st Oct 2008 11:31 AM
Personal macros not available when workbooks.open =?Utf-8?B?QW50b25pbw==?= Microsoft Excel Programming 1 18th Sep 2006 01:21 PM
2 workbooks open at same time break macros Brian Kranson Microsoft Excel Programming 4 15th Jun 2004 07:38 PM
Disable Button when no workbooks are open. Beto Microsoft Excel Programming 16 27th Feb 2004 07:30 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:45 AM.