code for saving

P

Pier

Hi,
how can i produce a code that when the program excel ask
me i want to save the file when i exit "don't save" and
close it.
Regards
Pier
 
A

Abdul Salam

Sub Auto_Close()
ThisWorkbook.Saved = True
ThisWorkbook.Close
End Sub


Abdul Salam
 
Top