ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   delete an excel file (https://www.excelbanter.com/excel-programming/283863-delete-excel-file.html)

ben.c

delete an excel file
 
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

Paul B[_6_]

delete an excel file
 
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" wrote in message
...
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 regards
Benjamin




Mike Tomasura

delete an excel file
 
If the excel worksheet is not open use this.

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




"Ben.c" wrote in message
...
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 regards
Benjamin




Keith Willshaw

delete an excel file
 

"Mike Tomasura" wrote in message
...
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



Mike Tomasura

delete an excel file
 
Yes, that would be more efficient.

Kill ("C:\test.xls")

But it sounds like a brutal command.

Mike



"Keith Willshaw" wrote in message
...

"Mike Tomasura " wrote in message
...
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





[email protected]

delete an excel file
 
In VBE help, search for the 'Kill statement'.

Kill YourFileName

HTH
Paul
--------------------------------------------------------------------------------------------------------------
Be advised to back up your WorkBook before attempting to make changes.
--------------------------------------------------------------------------------------------------------------

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 regards
Benjamin




All times are GMT +1. The time now is 05:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com