Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All,
I have a macro that l run from a workbook which requires a second workbook to be opened. The second workbook contains a AutoOpen macro, the code of which is in the ThisWorbook object. The AutoOpen macro prompts the user for Yes/No answers upon opening via message boxes. I would like to disable the AutoOpen macro on the second workbook when it is opened via the VBA code in the 1st workbook. The code l have used is Workbooks.Open ("BLB0000") The online help states that the above code will NOT initiate the AutoOpen macro but that does not seem to be the case ! I am developing the code in Excel 2000 but it will be also need to be used on Excel 97. Any help greatly appreciated. Michael Beckinsale. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Michael,
Use: Application.EnableEvents = False Workbooks.Open FileName:="BLB0000" Application.EnableEvents = True HTH, Bernie "Michael Beckinsale" wrote in message ... Hi All, I have a macro that l run from a workbook which requires a second workbook to be opened. The second workbook contains a AutoOpen macro, the code of which is in the ThisWorbook object. The AutoOpen macro prompts the user for Yes/No answers upon opening via message boxes. I would like to disable the AutoOpen macro on the second workbook when it is opened via the VBA code in the 1st workbook. The code l have used is Workbooks.Open ("BLB0000") The online help states that the above code will NOT initiate the AutoOpen macro but that does not seem to be the case ! I am developing the code in Excel 2000 but it will be also need to be used on Excel 97. Any help greatly appreciated. Michael Beckinsale. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro's are fun | Excel Worksheet Functions | |||
Automatically disable macro's on new doc | Excel Discussion (Misc queries) | |||
Hide Macro's in Toolbar / Macro's list | Excel Discussion (Misc queries) | |||
enable/disable macro's dialog? | Excel Programming |