Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Avoiding Overwrite Confirmation

I've got a script that collects information and then formats it in an Excel
sheet. I wasn tthe script to save the sheet with a particular filename,
even if the old file (say, from last week's run) is still there. Is there a
way to tell Excel it's okay ot overwrite the file when I call the SaveAs
method? I don't want to require user interaction.

I'm guessing I have to look for the file first and delete it
programmatically, but it seemed like such a simple option that I wanted to
ask first, to make sure I'm not missing anything. Thanks.

Jerry


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default Avoiding Overwrite Confirmation

One way:

Wrap your code like this:

Application.DisplayAlerts = False
ThisWorkbook.SaveAs fName
Application.DisplayAlerts = True


In article ,
"Jerry Camel" wrote:

I've got a script that collects information and then formats it in an Excel
sheet. I wasn tthe script to save the sheet with a particular filename,
even if the old file (say, from last week's run) is still there. Is there a
way to tell Excel it's okay ot overwrite the file when I call the SaveAs
method? I don't want to require user interaction.

I'm guessing I have to look for the file first and delete it
programmatically, but it seemed like such a simple option that I wanted to
ask first, to make sure I'm not missing anything. Thanks.

Jerry


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Avoiding Overwrite Confirmation

That was simple enough... Thanks.

Jerry

"J.E. McGimpsey" wrote in message
...
One way:

Wrap your code like this:

Application.DisplayAlerts = False
ThisWorkbook.SaveAs fName
Application.DisplayAlerts = True


In article ,
"Jerry Camel" wrote:

I've got a script that collects information and then formats it in an

Excel
sheet. I wasn tthe script to save the sheet with a particular filename,
even if the old file (say, from last week's run) is still there. Is

there a
way to tell Excel it's okay ot overwrite the file when I call the SaveAs
method? I don't want to require user interaction.

I'm guessing I have to look for the file first and delete it
programmatically, but it seemed like such a simple option that I wanted

to
ask first, to make sure I'm not missing anything. Thanks.

Jerry




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Confirmation Security Babs in Ohio Excel Worksheet Functions 0 April 15th 09 06:20 PM
Save confirmation issued twice Mitch Powell Excel Discussion (Misc queries) 0 April 17th 08 01:02 PM
A question about the confirmation loveflying_best[_2_] Excel Discussion (Misc queries) 1 October 8th 07 12:42 PM
Confirmation ID provided? chevy New Users to Excel 2 April 15th 06 06:22 PM
Getting rid of confirmation boxes DandruffKid New Users to Excel 2 March 28th 05 11:05 AM


All times are GMT +1. The time now is 08:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"