Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all.
I am having trouble figuring out a strange behavior with the Workbook_BeforeClose event procedure. Suppose I have a Workbook_BeforeClose event procedure that makes some changes to some worksheets and then save the workbook before closing. The changes made by the event procedure would be saved only if the workbook is closed manually in Excel by a user. However, if the workbook is opened and then closed by an external VB program using Excel application object, changes made by the Workbook_BeforeClose event procedure are NOT saved. In fact, the modification date/time of the Workbook file remains unchanged. To make sure the Workbook_BeforeClose ran if the workbook was closed by the external program, I placed several MsgBox statements in the Workbook_BeforeClose event procedure. And sure enough all the MsgBox messages were displayed, but changes were not saved. Does anyone know what is going on here with the Workbook_BeforeClose event? Thanks. Jason |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Workbook_BeforeClose event and OnTime method | Excel Programming | |||
Workbook_BeforeClose event is not canceled | Excel Programming | |||
Detecting a cancel on Workbook_BeforeClose event? | Excel Programming | |||
Workbook_Beforeclose vs BeforeClose Event | Excel Programming | |||
Workbook_BeforeClose Event | Excel Programming |