auto_close give me additional information?
Use the Workbook_BeforeClose event..
From workbook press Alt+F11 to launch VBE (Visual Basic Editor). From the
left treeview search for the workbook name and click on + to expand it.
Within that you should see the following
VBAProject(Your_Filename)
Microsoft Excel Objects
Sheet1(Sheet1)
Sheet2(Sheet2)
Sheet3(Sheet3)
This Workbook
Double click 'This WorkBook' and paste the below code to the right code pane.
Private Sub Workbook_BeforeClose(Cancel As Boolean)
MsgBox "About to close"
End Sub
--
Jacob (MVP - Excel)
"SteAXA" wrote:
Hi to everybody,
exists a way to know if i close only a workbook or the entire excel
application, when the users close the application by "X"? Exists anything
connected with auto_close that can take me that information?
I need this because when the user close a workbook or a application i need
to clean up an additional menu (that i've previously added for each workbook
opened by a macro) for the single workbook.
Thanks, Ste'
|