ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   SaveAs (https://www.excelbanter.com/excel-worksheet-functions/120402-saveas.html)

Stan Halls

SaveAs
 
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

Don

SaveAs
 
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


"Stan Halls" wrote:

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


Stan Halls

SaveAs
 
ChDir "O:\Distribution\SHalls\1NewBuild\11lodplan\Schedu le"
ActiveWorkbook.SaveAs Filename:= _
"O:\Distribution\SHalls\1NewBuild\11lodplan\Schedu le\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

"Don" wrote:

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


"Stan Halls" wrote:

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


Gord Dibben

SaveAs
 
Stan

Application.DisplayAlerts = False

your save code here

Application.DisplayAlerts = True


Gord Dibben MS Excel MVP

On Tue, 28 Nov 2006 07:49:03 -0800, Stan Halls
wrote:

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



Stan Halls

SaveAs
 
Gord
Thanks that worked perfect

Stan

"Gord Dibben" wrote:

Stan

Application.DisplayAlerts = False

your save code here

Application.DisplayAlerts = True


Gord Dibben MS Excel MVP

On Tue, 28 Nov 2006 07:49:03 -0800, Stan Halls
wrote:

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




Don

SaveAs
 
Nice. Yeah Stan...what Gord said!!

This little codeline helps me as well.

Sorry I wasnot more helpful, Stan!

"Gord Dibben" wrote:

Stan

Application.DisplayAlerts = False

your save code here

Application.DisplayAlerts = True


Gord Dibben MS Excel MVP

On Tue, 28 Nov 2006 07:49:03 -0800, Stan Halls
wrote:

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





All times are GMT +1. The time now is 12:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com