PDA

View Full Version : Solved: SaveAs Question



vzachin
10-18-2006, 10:13 AM
Hi,

My coding saves a file to the C Drive but I always get a dialog box asking "Do You Want To Replace It"? My answer is always "YES".
Is there any way to code this?
My macro stops here and I would have to click Yes. I want to bypass this and just save the file.


ActiveWorkbook.SaveAs Filename:= _
"C:\ne.xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False




thanks
zach

Bob Phillips
10-18-2006, 10:23 AM
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:="C:\ne.xls", _
FileFormat:=xlNormal, _
Password:="", _
WriteResPassword:="", _
ReadOnlyRecommended:=False, _
CreateBackup:=False
Application.DisplayAlerts = True

vzachin
10-18-2006, 11:48 AM
hi EL XID,

so all i needed was "Application.DisplayAlerts = False"

works like a charm! thanks.

zach