PDA

View Full Version : Solved: Disable Workbook_Open macro when opening another workbook



malik641
12-06-2005, 09:15 AM
Hey guys :)

Here's the deal.
I have a procedure that opens another workbook to import data into it. It has a Workbook_Open event that I don't want to execute when it opens, how do I disable it???

Thanks :thumb

mvidas
12-06-2005, 10:10 AM
Hi Joseph,

Application.EnableEvents is your friend here :) Dim WB As Workbook
Application.EnableEvents = False
Set WB = Workbooks.Open(WBPathAndName)
Application.EnableEvents = TrueMatt

malik641
12-06-2005, 11:06 AM
Awesome, forgot about that one!

Thanks Matt :thumb