Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng 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
Joined
Apr 7, 2003
Messages
147
Location
CA
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.
 
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

Back
Top