LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default deleting/overwriting an excelfile

Hi, I am using the following command to create a new excel file named
"Log.xls" (RetStr is defined above in the macro...)

Dim dummy As String
dummy = RetStr + "\Log.xls"

Set newBook = Workbooks.Add
With newBook
.Title = "ErrorLogs"
.SaveAs Filename:=dummy
End With

That works very good. But i need a routine that checks if the file already
exists. And if so, delete/overwrite that file before creating it (again).

Any hints?

TIA Walt


 
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
Overwriting a cell with a formula without deleting the formula MsBeverlee Excel Worksheet Functions 1 January 16th 10 02:09 PM
Overwriting most of a workbook Brad Excel Discussion (Misc queries) 3 July 2nd 07 02:42 PM
Excelfile wants to save before closing Carlo Excel Discussion (Misc queries) 5 February 2nd 07 11:01 AM
How do i lockup a locked excelfile if i have forgot the password? Halil Excel Discussion (Misc queries) 3 September 14th 05 03:43 PM
Spreadsheets are overwriting each other Bryan Excel Discussion (Misc queries) 5 August 12th 05 01:51 PM


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