WorkbookOpen() Auto macro

  • Thread starter Thread starter Richard
  • Start date Start date
R

Richard

Hi All
Is there a way of preventing the Workbook_Open() code from executing
when opening an Excel file with the ‘Open' method in VBA?
Thanks
Richard
 
Use something like this Richard

You disable events before you open the file

Sub test()
Application.EnableEvents = False
Workbooks.Open "ron.xls"
Application.EnableEvents = True
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top