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

I am using the following code to save the Workbook with a new name. I want
to overwrite the old file by the same name. I would like to avoid getting
the dialog box asking if I want to replace "Latest Import.csv". Is there a
way to simply replace it without the dialog box?


Sheets("Manipulation").Select
ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\Scott\My Documents\Latest Import.csv" _
, FileFormat:=xlCSV, CreateBackup:=False

Thank you in advance,
Scott


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 135
Default automatic overwrite file

Scott, use this

Application.DisplayAlerts = False
'Your Code
Application.DisplayAlerts = True


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2000 & 2003
** remove news from my email address to reply by email **
"S.E." wrote in message
...
I am using the following code to save the Workbook with a new name. I want
to overwrite the old file by the same name. I would like to avoid getting
the dialog box asking if I want to replace "Latest Import.csv". Is there a
way to simply replace it without the dialog box?


Sheets("Manipulation").Select
ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\Scott\My Documents\Latest Import.csv" _
, FileFormat:=xlCSV, CreateBackup:=False

Thank you in advance,
Scott




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default automatic overwrite file

Sheets("Manipulation").Select
Application.DisplayAlerts = False

ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\Scott\My Documents\Latest Import.csv" _
, FileFormat:=xlCSV, CreateBackup:=False
Application.DisplayAlerts = True

--
Regards,
Tom Ogilvy


"S.E." wrote in message
...
I am using the following code to save the Workbook with a new name. I want
to overwrite the old file by the same name. I would like to avoid getting
the dialog box asking if I want to replace "Latest Import.csv". Is there a
way to simply replace it without the dialog box?


Sheets("Manipulation").Select
ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\Scott\My Documents\Latest Import.csv" _
, FileFormat:=xlCSV, CreateBackup:=False

Thank you in advance,
Scott




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
Excel File Overwrite GradAsh10 Excel Discussion (Misc queries) 1 January 18th 10 04:13 PM
accidental file overwrite drumjam Excel Discussion (Misc queries) 1 December 31st 08 07:37 AM
retrieving of overwrite excel file? PLS! need help. Excel Discussion (Misc queries) 1 October 10th 05 10:34 AM
Say 'YES' to overwrite file Mike G. Excel Programming 6 June 1st 04 06:58 PM
how to overwrite a write reserved file? john_t_h[_13_] Excel Programming 0 January 15th 04 05:13 AM


All times are GMT +1. The time now is 05:24 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"