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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I overwrite an existing file? 1

Status
Not open for further replies.

LonnieJohnson

Programmer
Apr 16, 2001
2,628
US
I use this line of code to save an excel workbook.

Code:
    .ActiveWorkbook.SaveAs FileName:=strFileSave

However, it the file already exist it ask me if I want to overwrite it. How can I do it?

ProDev, MS Access Applications
Visit me at ==>
May God bless you beyond your imagination!!!
 
.DisplayAlerts = False
.ActiveWorkbook.SaveAs FileName:=strFileSave
.DisplayAlerts = True

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top