View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
FSt1 FSt1 is offline
external usenet poster
 
Posts: 3,942
Default Check if workbook is open...

hi
disable events.

Application.EnableEvents = False
Workbooks.Open Filename:= _
"C:\my\file\path\FileWithOnOpenMacro.xls"
Application.EnableEvents = True

this should disable the on open macro.
regards
FSt1

"John" wrote:

I have a workbook that runs a macro when it open. I have a second workbook
that needs to open the first workbook and import data. How do I prevent the
opening macro from running when the other workbook opens it?

Using Excel 2003

Thanks in advance!