+ Reply to Thread
Results 1 to 8 of 8

Run-time error '-2147417848 (80010108)':Automation error.The object invoked has disconnect

  1. #1
    Registered User
    Join Date
    01-15-2013
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2010
    Posts
    57

    Post Run-time error '-2147417848 (80010108)':Automation error.The object invoked has disconnect

    Hello everyone

    I have a shared excel file that serves as a department database, and it has a userform that allows users to search staff details and create new password. Also, the userform allows the admin team to edit, add, or delete staff details in the database using an admin password.

    This file is working well on my laptop. However, when I started using this in a network shared drive, it started giving this Automation Error in several functions. At first, it appeared when closing the userform that triggers the Activeworkbook.Close command. Then, after I changed it to Thisworkbook.Close, the Automation Error went on to searching a staff details, and even on ActiveWindow.DisplayHorizontalScrollBar. But what's driving me crazy is that after I specified the particular workbook & worksheet for each range or cell commands I used, the Automation Error still occur and it's an intermittent thing.

    Can someone please,please try to explain why this is happening? Is this a code or network error, or excel sharing conflict, or an excel bug?

    Since the error appeared almost everywhere on my code, I just pasted a sample code I already revised yet with intermittent error when executed.

    Please Login or Register  to view this content.
    Thank you so much for all your time to help.

    hydz1213

  2. #2
    Registered User
    Join Date
    04-30-2013
    Location
    Brussels
    MS-Off Ver
    Excel 2007
    Posts
    35

    Re: Run-time error '-2147417848 (80010108)':Automation error.The object invoked has discon

    Hello hydz1213,

    My first guess would be a Network error, and would make sense with the description of your error -2147417848 (80010108).

    If you're up to it, and if changing the network installation is not on the table, your best solution would be to use a more advanced way than a shared excel. I personnally avoid shared Excel files, and I use more Front-end/Back-end solution, like for example a read-only excel file that sends editing SQL strings to another database (excel, access, SQL server, your choice).

    As the connection to the network would only happen when users send data (modify cells, etc.), you can get the best out of a fragile network.

    But thats a whole other world if you are not familliar with it... anyway, your choice !
    Have fun.
    ExcelTab.com

  3. #3
    Registered User
    Join Date
    01-15-2013
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2010
    Posts
    57

    Re: Run-time error '-2147417848 (80010108)':Automation error.The object invoked has discon

    Thank you so much ExcelTab for your time and reply

    I haven't thought of using another language in my macros. Your suggestion really seems to be a good way to go. I actually prefer using ms access for this instead of excel but all our user's desktops doesn't have ms access installed so i remained in excel.

    With your suggestion, since i'm not particular yet with sql in vba, can you point me on the right direction where i can read guides or tutorial about this?

    I would really,really appreciate it!

    hydz1213

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Run-time error '-2147417848 (80010108)':Automation error.The object invoked has discon

    these lines
    Please Login or Register  to view this content.
    are in the wrong order
    Please Login or Register  to view this content.
    you shouldn't try and hold a reference to an object you haven't initialized

    with a shared excel workbook you're likely in for a world of trouble no matter what
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  5. #5
    Registered User
    Join Date
    01-15-2013
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2010
    Posts
    57

    Re: Run-time error '-2147417848 (80010108)':Automation error.The object invoked has discon

    Quote Originally Posted by JosephP View Post
    with a shared excel workbook you're likely in for a world of trouble no matter what
    Hi JosephP

    Thanks for the correction. I'll check on that one. Also, any suggestion I can use or do in order to make this file effective for multiusers even without sharing it?

    The thing is, since it's a staff database, they need to have the capacity to search their names & change their passwords in it. And just to add, this database is linked to 2 more excel files (A & B for example) that whenever they open A & B files and enter their staff ID#s, the database will temporarily open & search their details then populate them in certain cells in A & B workbooks.

    I'm really hoping you could suggest another way.

    Thanks again!

    hydz1213

  6. #6
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Run-time error '-2147417848 (80010108)':Automation error.The object invoked has discon

    use a database if you can

  7. #7
    Registered User
    Join Date
    01-15-2013
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2010
    Posts
    57

    Re: Run-time error '-2147417848 (80010108)':Automation error.The object invoked has discon

    I guess your're both right!

    I'm thinking to just create a local excel file for each users and incorporate a code I just found that will transfer data from excel to access dbase whenever there's a change on the file. My only problem with this is it copies in bulk. I need to find a way to use the SQL INSERT statement properly.

    But anyway, thank you both for your contributions on this. I really appreciate the ideas!

    Til next time!

    hydz1213

  8. #8
    Registered User
    Join Date
    04-30-2013
    Location
    Brussels
    MS-Off Ver
    Excel 2007
    Posts
    35

    Re: Run-time error '-2147417848 (80010108)':Automation error.The object invoked has discon

    Hello hydz1213,

    I also work with Access and Excel.
    What I usely do is a Read-Only Excel (of a few kb) that users open, and that is in connection with an Access Database.
    The good thing is that the users do not need to have Access on their computer for it to work! They all get the most updated data all the time, and nobody needs to save any file. Helps a lot!

    The trick is using objects. I use Active Data Objects (ADO).
    There is a lot of information on google about this. I recommend you search the internet for the keywords "ADODB.Recordset", "ADODB.Connection", etc

    Enjoy

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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