I am using the following script to email, save file and delete another file
VB Code:
Del_File = ThisWorkbook.FullName Saved_Name_Auth = ThisWorkbook.Path & "\Authorised\" & "Ex-Gratia" With activeworkbook .SendMail "email address here" End With MsgBox ("Copy of file has been sent to Finance.") With activeworkbook .SaveAs Saved_Name_Auth & " " & Format(Date, "dd mmm yy") & _ " " & Format(Time, "hh mm ss") & " Authorised" MsgBox ("Saved") End With Kill Del_File
My problem is that when the SaveAs is attempted I get the following -
Run-time error '-2147417848 (80010108)':
Automation error
The object invoked has disconnected from its client
Excel then crashes when I click on either 'End' or 'De-bug'
Not good........
Any ideas???




Reply With Quote