Thread: Delete a file
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dave Dawson Dave Dawson is offline
external usenet poster
 
Posts: 2
Default Delete a file

I'm processing a series of report files to turn them into tables, saving the
tables (workbooks), combining the tables into one composite workbook. This
will happen daily. I want to avoid the irritating messages that a file with
this name already exists. I don't see any way to make the .saveas prevent
that, and haven't found a reliable way to delete the files just before the
..saveas.

I thought surely the shell() function would do it with "del filename.ext",
but it didn't want to hear that. I even made a batch file to delete the
files, but it does it the first time through the program, then quits. It
seems there should be a more elegant way than a batch file anyway.

What am I missing?

Thanks,
Dave Dawson