delete file

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
 
D

Dirk Goldgar

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"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top