Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Confirmation Security | Excel Worksheet Functions | |||
Save confirmation issued twice | Excel Discussion (Misc queries) | |||
A question about the confirmation | Excel Discussion (Misc queries) | |||
Confirmation ID provided? | New Users to Excel | |||
Getting rid of confirmation boxes | New Users to Excel |