VBA - closing without saving changes

A

ajliaks

Hi,

This is very simply!

I am using the instruction

ActiveWorkbook.Close

to close file.

I need the macro cloosing the active workbook without asking for savin
changes. I need closing without saving changes!

How can I do?

Thanks
 
D

Don Guillett

try
ActiveWorkbook.Close saveD=true

OR
This example closes the workbook that contains the example code and discards
any changes to the workbook by setting the Saved property to True.

ThisWorkbook.Saved = True
ThisWorkbook.Close
 
R

Ron de Bruin

Or

ActiveWorkbook.Close False

This is the same as
ActiveWorkbook.Close SaveChanges:=False

--
Regards Ron de Bruin
http://www.rondebruin.nl


Don Guillett said:
try
ActiveWorkbook.Close saveD=true

OR
This example closes the workbook that contains the example code and discards
any changes to the workbook by setting the Saved property to True.

ThisWorkbook.Saved = True
ThisWorkbook.Close
 

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

Top