Results 1 to 2 of 2

Thread: Automation error

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2006
    Posts
    50

    Automation error

    I am using the following script to email, save file and delete another file

    VB Code:
    1. Del_File = ThisWorkbook.FullName
    2.     Saved_Name_Auth = ThisWorkbook.Path & "\Authorised\" & "Ex-Gratia"
    3.     With activeworkbook
    4.         .SendMail "email address here"
    5.     End With
    6.     MsgBox ("Copy of file has been sent to Finance.")
    7.     With activeworkbook
    8.         .SaveAs Saved_Name_Auth & " " & Format(Date, "dd mmm yy") & _
    9.             " " & Format(Time, "hh mm ss") & " Authorised"
    10.         MsgBox ("Saved")
    11.     End With
    12.     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???
    Last edited by si_the_geek; Jan 10th, 2006 at 08:16 AM. Reason: added VBCODE tags

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width