Close without "Do you want to save changes" prompt

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

Hello All
I would like to have a workbook that does not ask the user to save when
closing. I don't need big security, I just want to do away with the prompt.
Any assistance would be much appreciated.
Paul
 
Hi Paul,

To *never* save changes, paste this into the ThisWorkbook module:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Me.Close SaveChanges:=False
End Sub
 

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