Hello,
How do I delete a file with a macro?
de
thx
Hello,
How do I delete a file with a macro?
de
thx
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
thanks al lot
In <[email protected]>, 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
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks