delete file

  • Thread starter Thread starter dirk van waes
  • Start date Start date
D

dirk van waes

Hi,
I want to delete a file in the rootdirectory (c:\) of my computer. How do I
do that?
I tried
htask = Shell("del c:\example.mdb")
but that didn't work. I got the message: can't find the file!
TIA
Dirk
 
dirk van waes said:
Hi,
I want to delete a file in the rootdirectory (c:\) of my computer.
How do I do that?
I tried
htask = Shell("del c:\example.mdb")
but that didn't work. I got the message: can't find the file!
TIA
Dirk

Hi, Dirk!

You can use the VBA Kill statement to delete a file:

Kill "c:\example.mdb"
 
Back
Top