Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
"Go ahead and replace file" command?
I need to create a file and SaveAs a file with the same name. Will the
Alerts = False automatically tell it "Yes, replace the other file with the same name"? Or is there another line I should add to the SaveAs code to tell Excel to overwrite and replace the existing file? Thanks. Ed |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
"Go ahead and replace file" command?
Yes,
Application.DisplayAlerts = False will allow you to overwrite the file without prompt. Another approach is to Kill any existing file before doing the saveas fName = "C:\Myfolder\Myfile.xls" On Error Resume Next Kill fName On Error goto 0 Thisworkbook.SaveAs fName -- Regards, Tom Ogilvy "Ed" wrote in message ... I need to create a file and SaveAs a file with the same name. Will the Alerts = False automatically tell it "Yes, replace the other file with the same name"? Or is there another line I should add to the SaveAs code to tell Excel to overwrite and replace the existing file? Thanks. Ed |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
"Go ahead and replace file" command?
Thanks, Tom. I appreciate the help.
Ed "Tom Ogilvy" wrote in message ... Yes, Application.DisplayAlerts = False will allow you to overwrite the file without prompt. Another approach is to Kill any existing file before doing the saveas fName = "C:\Myfolder\Myfile.xls" On Error Resume Next Kill fName On Error goto 0 Thisworkbook.SaveAs fName -- Regards, Tom Ogilvy "Ed" wrote in message ... I need to create a file and SaveAs a file with the same name. Will the Alerts = False automatically tell it "Yes, replace the other file with the same name"? Or is there another line I should add to the SaveAs code to tell Excel to overwrite and replace the existing file? Thanks. Ed |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
"Find" a wildcard as a place marker and "replace" with original va | Excel Discussion (Misc queries) | |||
"FILE" command on the tool bar is missing - how do I recover it | Excel Discussion (Misc queries) | |||
How to "Replace()" multiple characters in one VBA command line | Excel Discussion (Misc queries) | |||
How to cancel a find & replace command "midstream"? | Excel Worksheet Functions | |||
Removing "Save As" Command from an excel file. | Excel Worksheet Functions |