delete an excel file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi
I would like to delete an excel file, but I don't know the program to do it. Could you help me, please
Thanks. Best regard
Benjamin
 
Benjamin, from my documents select the file you want to delete and hit
delete on the key board to send it to the recycle bin, if you want to bypass
the recycle bin do shift and delete, is this what you want or did I miss
under stand the question?
--
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 & 97
** remove news from my email address to reply by email **
Ben.c said:
hi,
I would like to delete an excel file, but I don't know the program to do
it. Could you help me, please ?
 
If the excel worksheet is not open use this.

Set objFso = CreateObject("Scripting.FileSystemObject")
objFso.DeleteFile ("c:\test.xls")




Ben.c said:
hi,
I would like to delete an excel file, but I don't know the program to do
it. Could you help me, please ?
 
Mike Tomasura said:
If the excel worksheet is not open use this.

Set objFso = CreateObject("Scripting.FileSystemObject")
objFso.DeleteFile ("c:\test.xls")

Why not use the built in VBA commands

Kill filename

Keith
 
Yes, that would be more efficient.

Kill ("C:\test.xls")

But it sounds like a brutal command.

Mike
 
Back
Top