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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top