Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Save Properties

Status
Not open for further replies.

bpeirson

Structural
Apr 7, 2003
147
I have some code which modifies a list of excel files then at the end of a loop I have the commands
ActiveWorkbook.Save
ActiveWorkbook.Close

How do I stop Excel from asking if I want to save changes when the close command is executed. My list is in excess of 300 files, repeatedly clicking "No" is very tedious.

Thanks.
 
Replies continue below

Recommended for you

You could try the following:
ActiveWorkbook.Close SaveChanges:=False
or
ActiveWorkbook.Close SaveChanges:=True


Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 

The line

Application.DisplayAlerts=False

will turn off warning messages
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor