View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Corey Corey is offline
external usenet poster
 
Posts: 276
Default delete a file in code

Try:


sub DeleteFile()
Application.DisplayAlerts =False
If Dir("C:\my documents\File Name to be Deleted.xls") < "" Then _
Kill "C:\my documents\File Name to be Deleted.xls"
Application.DisplayAlerts = True
end sub




Regards

Corey