SaveAs

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

this might be an easy one for someone in here , i have a short script that
saves a file in 2 places by over writing the exsisting files, when i run the
script i get a box that requires me to click on it to overwright the file....
how can i get the script to do this without asking ?
thank you in advance for your help

Stan
 
Can you post the code you are using?

Or, maybe this sample of code I use for file "replacement" will help...

ActiveWorkbook.SaveAs FileName:="c:\Readymix\" + savedfile,
FileFormat:=xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False, CreateBackup:=False
 
ChDir "O:\Distribution\SHalls\1NewBuild\11lodplan\Schedule"
ActiveWorkbook.SaveAs Filename:= _
"O:\Distribution\SHalls\1NewBuild\11lodplan\Schedule\delsch.xls" ,
FileFormat _
:=xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended _
:=False, CreateBackup:=False

ChDir "P:\Distribution\Schedule\Bracknell"
ActiveWorkbook.SaveAs Filename:= _
"P:\Distribution\Schedule\Bracknell\delsch.xls",
FileFormat:=xlNormal, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:=True, _
CreateBackup:=False
Range("A2").Select
Don,
this is the code i am using but i still get a dialog box come up with
file exists , do you wish to replace Y/ N/ C buttons, in lotus 123 its ,
close 1 stops this but i dont know what to do in excel
 
Stan

Application.DisplayAlerts = False

your save code here

Application.DisplayAlerts = True


Gord Dibben MS Excel MVP
 
Gord
Thanks that worked perfect

Stan

Gord Dibben said:
Stan

Application.DisplayAlerts = False

your save code here

Application.DisplayAlerts = True


Gord Dibben MS Excel MVP
 
Nice. Yeah Stan...what Gord said!!

This little codeline helps me as well.

Sorry I wasnot more helpful, Stan!
 
Back
Top