Thread: 'Kill'
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Harald Staff Harald Staff is offline
external usenet poster
 
Posts: 292
Default 'Kill'

Is it asking for "save changes " ?
Also, put
DoEvents
after the Close code to give it time to complete.

HTH. Best wishes Harald

"solomon_monkey" skrev i melding
ups.com...
Hi,

I've read and re read many posts on this subject- I do not want to
delete the file to the recycle bin just remove it completely so am
using...

Sub DeleteThisFile()

Dim DeleteFile As String

DeleteFile = ActiveWorkbook.FullName

ActiveWorkbook.Close
On Error Resume Next
kill DeleteFile

End Sub

The user need not know that the fiule is being deleted... however when
trying to run it I get the following 450 error

'Wrong number of arguments or invalid property assignment'

Am I missing something dreadfully obvious? It has been a long day...
Thanks