Closing a workbook during a macro without saving it

Ajtoo

New Member
Joined
Mar 14, 2002
Messages
5
I wish to close a workbook during a macro without saving it.
Currently, the vba command 'ActiveWorkbook.Close' brings up the usual dialogue box asking if I wish to save or not and I am able to select No, but wish to automate this process.
Due to the large amount of data, I also get a message if I want to save the data in the clipboard - again I wish to automate the No option.
How can I do this?
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
On 2002-03-18 01:49, Ajtoo wrote:
I wish to close a workbook during a macro without saving it.
Currently, the vba command 'ActiveWorkbook.Close' brings up the usual dialogue box asking if I wish to save or not and I am able to select No, but wish to automate this process.
Due to the large amount of data, I also get a message if I want to save the data in the clipboard - again I wish to automate the No option.
How can I do this?

ActiveWorkbook.Close False


For the clipboard...just clear it with
Application.cutcopymode = false


HTH

Ivan
 
Upvote 0

Forum statistics

Threads
1,213,549
Messages
6,114,261
Members
448,558
Latest member
aivin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top