Error on "Kill"?

E

Ed

I was given a Class Module called LogIt. I have forgotten the author and
where I got it, but I have used it before successfully with no errors. I
ran Code Cleanup and then Compiled, and got an error in the LogIt module on
the code
On Error GoTo HandleError

' Delete the current log file if it exists
If Len(Dir$(mstrPath & mstrFile)) > 0 Then
Kill mstrPath & mstrFile
End If

The error highlights "Kill" and says "Wrong number of arguments or invalid
property assignment." At the moment, all I can do to get past the error is
comment out the line. What am I missing?

Ed
 
D

Doug Robbins - Word MVP

Put in a

MsgBox mstrPath & mstrFile

and see what it returns (it will need to return the fullname (i.e. path and
filename) of the file that you want to delete.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

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

Top