View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Opening a file and disabling open events

Nigel,

Something like the following should work. You'll probably want to add some
error checking.

Dim WB As Workbook
Application.EnableEvents = False
Set WB = Workbooks.Open("C:\Book1.xls")
Application.EnableEvents = True


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)


"Nigel RS" wrote in message
...
Hi All
I have a an application (workbook) running some VBA code, I want this code
to open another application (workbook) but prevent its open events being
fired to prevent the opened workbook VBA code running.

How do I do this?

Cheers