ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ActiveWorkbook.SaveAs Problem (https://www.excelbanter.com/excel-programming/305899-activeworkbook-saveas-problem.html)

SowBelly

ActiveWorkbook.SaveAs Problem
 
Hello:

I am using ActiveWorkbook.SaveAs "filepath\filename" and it is working
just fine the first time around. Every time after that I get the Excel
MsgBox that informs me that the filename already exists and do I want
to overwrite. Since I have about 1300 files to do this with, I would
prefer to be able to force the ActiveWorkbook.SaveAs with no MsgBox.
Is it possible or do i have to test for the file first and delete it
before doing the SaveAs?

"Pigs can't be humans, but humans can be Pigs!"

Eating at the trough of life.

Oink!

SowBelly

kevan hanson

ActiveWorkbook.SaveAs Problem
 
Application.DisplayAlerts = False

should work.

Regards
Kevan

-----Original Message-----
Hello:

I am using ActiveWorkbook.SaveAs "filepath\filename" and

it is working
just fine the first time around. Every time after that I

get the Excel
MsgBox that informs me that the filename already exists

and do I want
to overwrite. Since I have about 1300 files to do this

with, I would
prefer to be able to force the ActiveWorkbook.SaveAs with

no MsgBox.
Is it possible or do i have to test for the file first

and delete it
before doing the SaveAs?

"Pigs can't be humans, but humans can be Pigs!"

Eating at the trough of life.

Oink!

SowBelly
.


Norman Jones

ActiveWorkbook.SaveAs Problem
 
Hi SowBelly,

Try:

Application.DisplayAlerts = False
ActiveWorkbook.SaveAs " "filepath\filename""
Application.DisplayAlerts = True


"SowBelly" wrote in message
...
Hello:

I am using ActiveWorkbook.SaveAs "filepath\filename" and it is working
just fine the first time around. Every time after that I get the Excel
MsgBox that informs me that the filename already exists and do I want
to overwrite. Since I have about 1300 files to do this with, I would
prefer to be able to force the ActiveWorkbook.SaveAs with no MsgBox.
Is it possible or do i have to test for the file first and delete it
before doing the SaveAs?

"Pigs can't be humans, but humans can be Pigs!"

Eating at the trough of life.

Oink!

SowBelly




SowBelly

ActiveWorkbook.SaveAs Problem
 
Norman:

Worked great!

SowBelly

On Wed, 4 Aug 2004 01:29:29 +0100, "Norman Jones"
wrote:

Hi SowBelly,

Try:

Application.DisplayAlerts = False
ActiveWorkbook.SaveAs " "filepath\filename""
Application.DisplayAlerts = True


"SowBelly" wrote in message
.. .
Hello:

I am using ActiveWorkbook.SaveAs "filepath\filename" and it is working
just fine the first time around. Every time after that I get the Excel
MsgBox that informs me that the filename already exists and do I want
to overwrite. Since I have about 1300 files to do this with, I would
prefer to be able to force the ActiveWorkbook.SaveAs with no MsgBox.
Is it possible or do i have to test for the file first and delete it
before doing the SaveAs?

"Pigs can't be humans, but humans can be Pigs!"

Eating at the trough of life.

Oink!

SowBelly




SowBelly

ActiveWorkbook.SaveAs Problem
 
Kevan:

Worked great!

Oink!

SowBelly

On Tue, 3 Aug 2004 17:29:10 -0700, "kevan hanson"
wrote:

Application.DisplayAlerts = False

should work.

Regards
Kevan

-----Original Message-----
Hello:

I am using ActiveWorkbook.SaveAs "filepath\filename" and

it is working
just fine the first time around. Every time after that I

get the Excel
MsgBox that informs me that the filename already exists

and do I want
to overwrite. Since I have about 1300 files to do this

with, I would
prefer to be able to force the ActiveWorkbook.SaveAs with

no MsgBox.
Is it possible or do i have to test for the file first

and delete it
before doing the SaveAs?

"Pigs can't be humans, but humans can be Pigs!"

Eating at the trough of life.

Oink!

SowBelly
.




All times are GMT +1. The time now is 02:10 AM.

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