Thread: app.quit
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein \(MVP - VB\)[_1262_] Rick Rothstein \(MVP - VB\)[_1262_] is offline
external usenet poster
 
Posts: 1
Default app.quit

The last sentence of the help files for Quit says this...

"If you set the Saved property for a workbook to True without
saving the workbook to the disk, Microsoft Excel will quit
without asking you to save the workbook."

So, executing this...

ThisWorkbook.Saved = True

before your Application.Quit statement should do it for you.

Rick


"Joanne" wrote in message
...
When I am ready to close my ws, I have a button that clears all contents
so the sheet is a blank form ready for the next usage. The last command
on my 'Clear' button is Application.Quit. It always asks if I want to
save my changes. Is there a way to disable this so that it will just
quit when I click my command button?
Thanks for the info
Joanne