code for saving

  • Thread starter Thread starter Pier
  • Start date Start date
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
 
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

Back
Top