+ Reply to Thread
Results 1 to 25 of 25

Error: automation error the object invoked has disconnected from its clients

  1. #1
    Registered User
    Join Date
    08-11-2013
    Location
    SA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Error: automation error the object invoked has disconnected from its clients

    Good day all,

    I built a vba userform in my excel file and frequently receiving "automation error the object invoked has disconnected from its clients" error. Some times it works and some times it is not. I have comboboxes in the form, by choosing the comboboxes some times it does not show the range on itself and some times it just give me "Run Time" Error and close the excel.
    it does confuse me because it happens some times not always.

    I do appreciate in advance for your help.

    Cheers.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    08-11-2013
    Location
    SA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Error: automation error the object invoked has disconnected from its clients

    I just read lots of articles bout this error but could not handle how to solve it. the latest article was "INFO: Error or Unexpected Behavior with Office Automation When You Use Early Binding in Visual Basic" so I considered i need to do qualifying my code but i do not know how?!

    here is the codes which I wrote on a excel vba userform:

    Please Login or Register  to view this content.
    It is a data entry form which gives the user options to reset the form, submit or reload it. I it works fine at same time but as long as I submit for first time and reload it to submit next item it gives me that error.

    I checked it on another pc and it works fine, I am not sure what is wrong with my pc.

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Error: automation error the object invoked has disconnected from its clients

    Hi siroos12

    With Code changes in the attached I get no indication of this
    as long as I submit for first time and reload it to submit next item it gives me that error
    Let me know of issues.
    Attached Files Attached Files
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  4. #4
    Registered User
    Join Date
    08-11-2013
    Location
    SA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Error: automation error the object invoked has disconnected from its clients

    Thanks jaslake,

    I see the deferences. I just opened the file and it worked first time that I open the form. on second time when I try to open combo boxes it just close the excel. now I considered if i close the excel file and re open it it does not work even on first time.
    Last edited by siroos12; 12-16-2013 at 04:50 AM.

  5. #5
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Error: automation error the object invoked has disconnected from its clients

    Hi siroos12

    I'm not able to duplicate this on the Sample File. Are you getting this behavior on the Sample File or your Live File?
    on second time when I try to open combo boxes it just close the excel. now I considered if i close the excel file and re open it it does not work even on first time.

  6. #6
    Registered User
    Join Date
    08-11-2013
    Location
    SA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Error: automation error the object invoked has disconnected from its clients

    Hi there,

    I just downloaded your file and try to test it.

  7. #7
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Error: automation error the object invoked has disconnected from its clients

    Hi siroos12

    Just a shot in the dark...set the Zoom on the Ranges Worksheet to 100%...

  8. #8
    Registered User
    Join Date
    08-11-2013
    Location
    SA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Error: automation error the object invoked has disconnected from its clients

    It is 100% and still the same issue

  9. #9
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Error: automation error the object invoked has disconnected from its clients

    Hi siroos12

    I don't have Excel 2013. I've tested the Sample File in Excel 2007 and 2010 with no issues. If you have either of these versions try running the File in these versions. Other than that, sorry, I'm out of ideas.

  10. #10
    Registered User
    Join Date
    08-11-2013
    Location
    SA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Error: automation error the object invoked has disconnected from its clients

    Thanks my friend,

    I am building this for a customer, lets hope that they use 2007 or 2010. By the way i just removed the part of cod which unload and show the form again after submitting first record. It works now but i need to press the button to add next record which is not too bad

    I do appreciate all others if they can help.

    Thanks.

  11. #11
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Error: automation error the object invoked has disconnected from its clients

    You're welcome...sorry I couldn't help...best of luck.

  12. #12
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Error: automation error the object invoked has disconnected from its clients

    What happens if you remove the DTPicker controls?

    Also, have you tried populating the comboboxes in the Initialize event rather than using the RowSource property?

    For example.

    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  13. #13
    Registered User
    Join Date
    08-11-2013
    Location
    SA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Error: automation error the object invoked has disconnected from its clients

    Hi Norie.

    I will give it try but i do not know how to initialize the comboboxes. i need to google it

  14. #14
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Error: automation error the object invoked has disconnected from its clients

    The code I posted is for populating the comboboxes.

    It would go in the Initialize event of the userform.

  15. #15
    Registered User
    Join Date
    08-11-2013
    Location
    SA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Error: automation error the object invoked has disconnected from its clients

    Dear Norie,

    Is it going to be like this?
    Please Login or Register  to view this content.

  16. #16
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Error: automation error the object invoked has disconnected from its clients

    No, the code goes in the form's Initialize event.
    Please Login or Register  to view this content.
    By the way, have you tried removing the DTPickers? That was kind of the main point of my post.
    Last edited by Norie; 12-17-2013 at 08:56 AM.

  17. #17
    Registered User
    Join Date
    08-11-2013
    Location
    SA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Error: automation error the object invoked has disconnected from its clients

    yes i did. but does not help. let me try this code and will update you.

  18. #18
    Registered User
    Join Date
    08-11-2013
    Location
    SA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Error: automation error the object invoked has disconnected from its clients

    Thanks Norie, it does not give me that error any more but new issue. the "reset form" button does not work any more. and I need a message box popup after submitting the form says: "Do you want to submit new record?" with yes/no buttons.so by pressing submit button msgbox says "do you want to submit?". by pressing "yes" I need the next msgbox "Do you want to submit new record?" popup and by pressing "yes" reset the form and by pressing "no" close the form. how do I do that?

  19. #19
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Error: automation error the object invoked has disconnected from its clients

    What I posted shouldn't affect anything else.

    Did you remove/change any of the existing code?

  20. #20
    Registered User
    Join Date
    08-11-2013
    Location
    SA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Error: automation error the object invoked has disconnected from its clients

    Wow it works now, it was my mistake! i added your code to the file that "jaslake" provided. I just added it to my initial file and it works stunning. Thanks a lot guys.

  21. #21
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Error: automation error the object invoked has disconnected from its clients

    Hello siroos12,

    Jaslake and Norie have gone to great lengths helping you to solve your issue.

    Please be so polite as to at least mark this Thread as Solved.

    Thank you.

    Regards.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  22. #22
    Registered User
    Join Date
    08-11-2013
    Location
    SA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Error: automation error the object invoked has disconnected from its clients

    Hi Winon,

    I really do appreciate of their help. I did not want to be impolite my friend but if I did something wrong I am sorry for that and thank a lot for their help and your comment as well. thanks all.

    I do not know how to mark it solved? I wanted to do it before but i did not know how to?!
    Would you please tell me how to do that?

    Best regards.

  23. #23
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Error: automation error the object invoked has disconnected from its clients

    Hello siroos12,

    That is the way to go, thank you for your feedback.

    Go to each Post of everyone that has offered you a solution, and click on the Star * to the far left at the bottom of that Post, and add to their Reputation.

    Then go to your first Post, and above the Post Screen, select Thread Tools> Solved.

    Thank you kindly.

    Regards.

  24. #24
    Registered User
    Join Date
    08-11-2013
    Location
    SA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Error: automation error the object invoked has disconnected from its clients

    I will do it now, and will do on my other post later as well. thanks a lot.

  25. #25
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Error: automation error the object invoked has disconnected from its clients

    Hello siroos12,

    Thank you for your kind co-operation.

    Merry Christmas to you, and all you nearest and dearest.

    Regards

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 11-22-2013, 11:56 AM
  2. 2147417848 automation error the object invoked has disconnected from its clients
    By KasiaFavourite in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-12-2011, 10:44 AM
  3. -2147417848 automation error the object invoked has disconnected from its clients
    By ajaykgarg in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 11-12-2011, 08:10 AM
  4. Automation Error: "The object invoked has disconnected from its clients"
    By cartman44 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-03-2009, 04:51 PM
  5. Replies: 3
    Last Post: 06-17-2005, 09:05 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1