• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Is there any to skip "Private Sub Workbook_Open" event

ThrottleWorks

Excel Ninja
Hi,

I am trying to open a file through macro. This (opened) file has a macro in it.

"Private Sub Workbook_Open" the moment I open this file, this macro gets triggered due to workbook open event.

Is there any way I can skip running this macro, if do not want to run this macro, is it possible ?

Can anyone help me in this please.
 
Hi @Luke M Sir, thanks a lot for the help and your valuable time.

Sir, I checked as you advised, the macro did not get triggered when I pressed Shift key however how do I do this while running the macro.

I am opening this file with another file. Please reply if you get time.
As of now I am not facing any issue due to this.

Good night. :)
 
From http://dailydoseofexcel.com/archives/2004/08/18/running-macros-when-a-workbook-is-opened/

There are two ways to run a macro when a workbook is opened; the Workbook_Open event and an Auto Open macro.

The Workbook_Open event resides in the ThisWorkbook module. The Auto open macro belongs in a standard module. If you have both, the event procedure will fire before the Auto open procedure.

Other than their location, the primary difference between the two is what happens when you open a workbook via code. The event will still fire, the Auto open macro will not. VBA provides a RunAutoMacros method of the workbook object that allows you to run the Auto open code when a workbook is opened through VBA.
 
Back
Top