Kill Statement

  • Thread starter Thread starter Bob
  • Start date Start date
B

Bob

Hello All,

I am printing reports to file in a specific folder. But
first I use the Kill statement to delete all the files in
the specific folder.

The problem is when the folder is empty. A dialogue box
pops up and states "Object not found". How can I get
around this? I need to use the Kill statement just in
case there are files in the folder.

Thanks
 
If Dir("C:\HousAuth\*") > "" Then

Just as a note, this is far more efficient and quicker:-

If Len(Dir("c:\houseauth\*"))>0 Then


although both work fine.


Tim F
 
Back
Top