How: open a workbook with auto macro disabled using code?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to open a number of workbooks from VBA in excel and I need to
open them with macros disabled or auto macro disabled. This is because the
worksheets I need to open have an auto macro which loads data from a server
and I do not want it to run.
Thanks.
 
Application.EnableEvents = False
workbooks.Open "C:\MyFolder\Myfile.xls"
Application.EnableEvents = True

disables the startup macros.
 

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