Open workbook using VBA but don't run macros

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

Guest

What is the line I can use to open a spreadsheet (123.xls say), but not run
the macros that are in the open event of 123.xls

I can open the workbook using
workbooks.open FileName:= "C:\123.xls"
but the macros run.

How do I do this? Is it possible?
 
application.enableevents = false
workbooks.open filename:="C:\123.xls"
application.enableevents = true

You may want to do the same thing when you close the workbook.
 
Back
Top