Application.Close

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hell

I can catch a workbook close just fine but if someone clicks on the X button in the corner of Excel to close the whole application my macro doesn't work quite right

I've got a little progress bar that I like to run when the workbook is closed in order to monitor that it deletes everything it needs to delete. But if the user pushs the application close button this userform loads but then does not run the userform_activate statement. Anyone have any ideas?
 
application.quit

--
Don Guillett
SalesAid Software
(e-mail address removed)
Nichevo said:
Hello

I can catch a workbook close just fine but if someone clicks on the X
button in the corner of Excel to close the whole application my macro
doesn't work quite right.
I've got a little progress bar that I like to run when the workbook is
closed in order to monitor that it deletes everything it needs to delete.
But if the user pushs the application close button this userform loads but
then does not run the userform_activate statement. Anyone have any ideas?
 
Huh? The OP wants to run some code when the user tries and quits the
application!

--
Regards,

Tushar Mehta, MS MVP -- Excel
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 
Works fine for me (XL2002 SP1). How are you trapping the close event,
etc.? I used a Workbook_BeforeClose event procedure. It, in turn,
showed a userform non-modally. The userform's activate event updated a
label on the userform. After a few seconds, the _BeforeClose code
unloaded the userform.

--
Regards,

Tushar Mehta, MS MVP -- Excel
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 
Back
Top