Close Workbook without displaying message to Save

  • Thread starter Thread starter Vinay
  • Start date Start date
V

Vinay

Hello:
I have a User form with a button labelled "CLOSE" which closes the
form as well as Quits the application. How I can prevent the Excel
Message which ask whether the user wants to save the file?
I would like to close the file without saving

TIA
 
Hi
try
application.displayalerts=false
activeworkbook.close
application.displayalerts=True
 

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