Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Check if workbook is open...
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! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Check if workbook is open...
put your open code in a standard module called Auto_Open. it will only run when
the workbook is opened manually not via code. if you have your code in a workbook_open module, it will fire whether the workbook is opened manually or via code. -- Gary "John" wrote in message ... 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! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Check for open workbook | Excel Programming | |||
If Then to check if a workbook is open | Excel Discussion (Misc queries) | |||
Check if workbook is already open... | Excel Programming | |||
How check if workbook open? | Excel Programming | |||
Check for open workbook | Excel Programming |