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

I cannot determine how to write the language to overwrite
an existing file when performing "active workbook, file
save as".

I have the following code and would like for the macro to
answer "yes" for replacing the current file, but I do not
know how to write it.
ActiveWorkbook.SaveAs FileName:="C:\Temp\2003
Trial\data.xls" _
, FileFormat:=xlExcel5, Password:="",
WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False

Thank you for your help,
Kimberly

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Replace File

Application.DisplayAlerts = False
ActiveWorkbook.SaveAs FileName:= _
"C:\Temp\2003 Trial\data.xls" _
, FileFormat:=xlExcel5, Password:="", _
WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
Application.DisplayAlerts = True

Regards,
Tom Ogilvy

"Kimberly" wrote in message
...
I cannot determine how to write the language to overwrite
an existing file when performing "active workbook, file
save as".

I have the following code and would like for the macro to
answer "yes" for replacing the current file, but I do not
know how to write it.
ActiveWorkbook.SaveAs FileName:="C:\Temp\2003
Trial\data.xls" _
, FileFormat:=xlExcel5, Password:="",
WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False

Thank you for your help,
Kimberly



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
Book1.XLS replace by old file name Cowboyfan Excel Discussion (Misc queries) 2 June 5th 09 09:28 PM
Replace All makes me look for a file! tina Excel Discussion (Misc queries) 6 February 18th 08 06:34 PM
file replace kar Excel Discussion (Misc queries) 2 November 21st 07 12:10 PM
how do set excel up to auto replace a file? jenn Excel Discussion (Misc queries) 1 October 4th 06 07:58 PM
If I accidently replace a saved file can I retrieve the old file? kamabiv Excel Discussion (Misc queries) 1 May 11th 05 10:26 PM


All times are GMT +1. The time now is 02:11 PM.

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"