in the
vb editor, double click the "thisworkbook" entry under microsoft excel
objects and select workbook from the dropdown and then before close from the
event dropdown
Private Sub Workbook_BeforeClose(Cancel As Boolean)
' your macro
End Sub
or use
sub auto_Close()
' your macro
end sub
in a general module
--
Gary
"Patrick C. Simonds" wrote in message
...
I need to run a macro every time my workbook close. Can this be done?