beforeclose placement
I have similar problem. Put a Pop-up calendar in personal.xls by Dave Green.
The beforeclose event doesn't work to clear the calendar from the right click
menu. I have numerous add-ins that are password protected. Don't know if the
applications.enableevents is on or off. He has a work-a-round in the open
event. Also, should I put Option Explicit in. Excel doesn't.
Sorry about the previous blank reply.
"Dave Peterson" wrote:
Any chance that you have other workbook/worksheet events and in any of those
events you've toggled the application.enableevents to off (without resetting it
back to on).
This would mean that the workbook_beforeclose event would not fire.
Curt wrote:
Does the placement of the beforeclose have any bearing on operation. It has a
few times failed this is why I ask following is my placement. Does it need to
be last?
Thanks
Option Explicit
---------
Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.Save
End Sub
----------
Private Sub Workbook_open()
Userform1.Show
End Sub
--
Dave Peterson
|