Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Workbook BeforeClose Bug
Does anyone have an explanation for the following:
1) Put this code in the ThisWorkbook module of a new blank Excel Workbook. Private Sub Workbook_BeforeClose(Cancel As Boolean) ThisWorkbook.Worksheets("Sheet2").Activate End Sub 2) Save the workbook as Test1.xls 3) Close Excel. 4) Make a copy of Test1.xls and name it Test2.xls. 5) Open both Test1.xls and Test2.xls. 6) Click the Close ("X") button for Excel (the upper right hand corner of the Excel window). You will notice that neither workbook closes. What is that all about. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
beforeclose placement | Excel Discussion (Misc queries) | |||
PASSWORD PROTECT BEFORECLOSE | Excel Discussion (Misc queries) | |||
BeforeClose Dilemma | Excel Programming | |||
Workbook_Beforeclose vs BeforeClose Event | Excel Programming | |||
BeforeClose event - Savings | Excel Programming |