Home |
Search |
Today's Posts |
#1
|
|||
|
|||
How to delete file
Hello, How do I delete a file with a macro? de thx -- kizzie ------------------------------------------------------------------------ kizzie's Profile: http://www.excelforum.com/member.php...o&userid=26092 View this thread: http://www.excelforum.com/showthread...hreadid=394483 |
#2
|
|||
|
|||
Good morning Kizzie Use this: Kill "C:\Thisfile.xls" Please note that this will not send the file to the recycle bin (this can't be done without resorting to Windows API calls) but will completely delete it. HTH DominicB -- dominicb ------------------------------------------------------------------------ dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932 View this thread: http://www.excelforum.com/showthread...hreadid=394483 |
#3
|
|||
|
|||
thanks al lot :) -- kizzie ------------------------------------------------------------------------ kizzie's Profile: http://www.excelforum.com/member.php...o&userid=26092 View this thread: http://www.excelforum.com/showthread...hreadid=394483 |
#4
|
|||
|
|||
In , kizzie told
us an interesting story. My reply to this story is at the bottom of this message. Hello, How do I delete a file with a macro? de thx According to the MSDN Library, there are 2 ways to delete a file: FSO.DeleteFile(TestFilePath & "\Beatles\OctopusGarden.txt") Set File = FSO.GetFile(TestFilePath & "\Beatles\BathroomWindow.txt") File.Delete FSO, as you might have guessed, has to be declared as a FileSystemObject. GIYF for the gritty details. -- Amedee Van Gasse |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
excel file deleted. Now howdo you delete file NAME | New Users to Excel | |||
Can't find macro in an Excel file to delete it | Excel Discussion (Misc queries) | |||
"Delete sheet" not an available option on File menu. | Excel Worksheet Functions | |||
Read Text File into Excel Using VBA | Excel Discussion (Misc queries) | |||
How do I Delete a file from the drop down file menu? | Excel Worksheet Functions |