If I comment out all the Workbook activate code in the first (buttons) workbook, the problem goes away, but that defeats the whole purpose of the workbook, and the code has been unchanged for a few years. I have tried incrementally commenting out all the code in the Workbook Open Event of the second (data) workbook and the problem remains. The problem is not apparent with any other combination of workbooks. If I first open a blank workbook and the VBE and enter into the Immediate Window “application.enableevents = false” before opening the two workbooks the problem does not occur. None of the workbooks has any objects defined. The problem does not affect other workbooks, so if I have the first workbook (with the buttons) open with another workbook (that is also macro enabled and has Workbook Open events), I can close that workbook without Specifically, if the VBE is not open, there is not a problem. The problem occurs only when I close the second workbook (containing the data), and only when all three conditions above are true. ![]() Both are macro enabled and both have ThisWorkbook events (Activate for the first and Open for the second), but not BeforeClose events. ![]() The second is a larger workbook consisting of 11 sheets and 351 Kb in size Įach worksheet contains multiple rows of data about parts kept in stock. The first is a workbook of 79 Kb, consisting of a single worksheet showing buttons that are clicked to call various procedures, mostly to open other workbooks in a suite of sheets. (Not the code error message with the Debug option - a simple error message box with OK and Help buttons). I always receive a Visual Basic For Applications error message “Out of Memory” when I close one workbook under certain defined conditions.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |