3/14/2024 0 Comments Disable macros in excel document![]() This flag could test to see if the first workbook is open, and if it is, not run the main code in the AutoClose macro. You can (and should) then set the EnableEvents property to True so that events can later continue.Īnother workaround is to set some sort of "flag" in the AutoClose macro of the second workbook. ![]() The first involves modifying your code that closes the second workbook, in this manner:īy setting the EnableEvents property to False, the event that is going to happen (closing the workbook) will not trigger the AutoClose macro. There are a couple of workarounds, however. (If you are opening it manually, you can obviously hold down the Shift key as the workbook opens, but that doesn't help your macro-it has no fingers to hold down that key!) ![]() There is no way to disable the macros in the second workbook when opening it under macro control. He is looking for a way to open the second workbook, under the control of the macro in the first workbook, without enabling the macros in the second workbook. He would like for the macro to open a second workbook that has an AutoClose macro in it, but he doesn't want it to run when the second workbook is closed. Bob is processing information in a workbook by using a macro.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |