Closing a workbook

  • Thread starter Thread starter Belinda
  • Start date Start date
B

Belinda

Hello All

I have built a application in Excel which uses multiple workbooks when
I press a button I jump from one workbook to another.

To exit a workbook I used the following Activeworkbook.close but
everytime I do this I get a message to save or discard the changes
from Excel. All these workbooks are reports and no changes are made
whatsoever.

Can you kindly provide a workaround how I can close the workbook
programatically without encountering this save or discard message.

Many thanks
Belinda
 
Belinda,

Try something like

ActiveWorkbook.Close savechanges:=False


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Belinda,

Just add one little word!

Activeworkbook.Close False

HTH,
Nikos
 

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