+ Reply to Thread
Results 1 to 16 of 16

Run-time error -2147417848 (80010108) Method "Show" of object failed

  1. #1
    Registered User
    Join Date
    01-11-2021
    Location
    Hemet, CA
    MS-Off Ver
    Office 365
    Posts
    4

    Run-time error -2147417848 (80010108) Method "Show" of object failed

    Hello,

    I have attached my vba excel program. I am having an issue with an established program that will not load a dialog box. I believe thats what the error is. The program has been working in years and nothing has changed. Its failing on 2 different machines.

    Any solutions to solve this?

    The error is happening here:


    Code.png

    Thanks,
    Brock
    Attached Files Attached Files
    Last edited by brockbaker27; 01-11-2021 at 04:32 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Run-time error -2147417848 (80010108) Method "Show" of object failed

    Someone else just had the same problem. Which is very unusual because DialogSheets are obsolete.

    Once I fixed your declarations so I could run this on a 64-bit system, it worked for me. Is this what is supposed to happen at that point?
    dialog.jpg

    The member above had to reinstall Office to fix it, but I'm not sure that's the only solution.

  3. #3
    Registered User
    Join Date
    01-11-2021
    Location
    Hemet, CA
    MS-Off Ver
    Office 365
    Posts
    4

    Re: Run-time error -2147417848 (80010108) Method "Show" of object failed

    Oh wow, maybe this was due to an office update then. Yes that is what was supposed to happen. Thats great you figured it out. What did you have to change to fix it?

    Thank you so much!

  4. #4
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: Run-time error -2147417848 (80010108) Method "Show" of object failed

    You should create a new type of "dialog boxes" i.e. "UserForms".
    The changes in the code will not be drastic, e.g.:
    Please Login or Register  to view this content.
    , although the "workload" may turn out to be quite large, because you have to create all "dialogs" with edit fields from scratch.

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Run-time error -2147417848 (80010108) Method "Show" of object failed

    Quote Originally Posted by brockbaker27 View Post
    Thats great you figured it out. What did you have to change to fix it?
    I didn't fix it. I just tried running it and it ran.

    My version of Office is 64-bit. You have library calls that are 32-bit so I had to change them just to be able to compile the code. The quick explanation is that a function has to be declared as

    Please Login or Register  to view this content.
    and any Long variables for that function have to be declared LongPtr. If the function returns a LongPtr, then any variable you assign it to has to be declared LongPtr.

    But that isn't the problem. That just happens to be what I had to do to try your code; your code doesn't compile on a 64-bit system.

    The other case I looked at did not have 32-bit library calls, so I just opened it and it ran.

    Since you both had the same problem at the same time, I do suspect an Office update. However, that doesn't explain why it runs for me.

  6. #6
    Registered User
    Join Date
    01-12-2021
    Location
    London, England
    MS-Off Ver
    365
    Posts
    2

    Re: Run-time error -2147417848 (80010108) Method "Show" of object failed

    I am having the same problem today. Excel updated itself a couple of hours ago and I can't make it go back to the old version.
    My code is incredibly simple and has been running for 20 years I think

    DialogSheets("PostingList").Show

    That's all - and I get Method 'show' of object 'DialogSheet' failed - and then I can't even save the workbook but have to go to transaction manager and end the application!

  7. #7
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Run-time error -2147417848 (80010108) Method "Show" of object failed

    Welcome to the Forum AdrianStern!

    Although it appears that you have a similar problem, we prefer that you open a new thread rather than adding your question to an existing thread. You can monitor this thread for answers to the original question, which may solve yours, or you can start a new thread with the details of your own problem. (Once you post to a thread you are automatically subscribed, and depending on your settings you will get emails when there are new posts. You can login and go to User CP to see your subscribed threads.)

    As a new member, please take the time to review our rules. There aren't many, and they are all important. Here is the applicable rule:

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread

  8. #8
    Registered User
    Join Date
    01-12-2021
    Location
    London, England
    MS-Off Ver
    365
    Posts
    2

    Re: Run-time error -2147417848 (80010108) Method "Show" of object failed

    I wasn't asking a question. Just adding a comment that this happened to me today
    It seems that suddenly DialogSheets are no longer supported from this new version of excel with no warning
    It looks as though I have to replace it with a UserForm which I have started on. I suppose like in old VB.
    Damn nuisance.
    MS are a damn nuisance - always were too big for their boots. Like the mystery of what Outlook is up to all the time when it should be doing nothing at all it can draw
    over 65% cpu. Not a bug they say. My cpu is too small they say. Previous versions worked normally
    Ah well. Have to sit and code and debug for a few hours

  9. #9
    Registered User
    Join Date
    01-11-2021
    Location
    Hemet, CA
    MS-Off Ver
    Office 365
    Posts
    4

    Re: Run-time error -2147417848 (80010108) Method "Show" of object failed

    Hello porucha vevrku,

    I am not very good at updating old programs with userforms. I am getting an error at the .Edit_PN.Text = default. Could you see what I am doing wrong?

    Please Login or Register  to view this content.

  10. #10
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Run-time error -2147417848 (80010108) Method "Show" of object failed

    Quote Originally Posted by 6StringJazzer View Post
    and any Long variables for that function have to be declared LongPtr.
    This is not correct. Only pointers/handles should be declared as LongPtr, not all Long variables. That is likely to get you into trouble with API calls!
    Rory

  11. #11
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Run-time error -2147417848 (80010108) Method "Show" of object failed

    I checked my version and there were updates pending. When I applied the updates, now when I run the same code that worked before, Excel crashes on Show for DialogSheets. The process dies.

    So there is some issue introduced in the latest update. I can't speculate as to whether it was deliberate deprecation of DialogSheets or simply a new bug.

  12. #12
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: Run-time error -2147417848 (80010108) Method "Show" of object failed

    Quote Originally Posted by brockbaker27 View Post
    ...I am getting an error at the .Edit_PN.Text = default. Could you see what I am doing wrong? ...
    You must first create a "UserForm" with its objects (text boxes, lists, buttons, etc.) and adapt the code to the names you give these objects in "UserForm".

  13. #13
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Run-time error -2147417848 (80010108) Method "Show" of object failed

    Quote Originally Posted by rorya View Post
    This is not correct. Only pointers/handles should be declared as LongPtr, not all Long variables. That is likely to get you into trouble with API calls!
    I stand corrected. I was shooting from the hip, should have confirmed this before posting.

  14. #14
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Run-time error -2147417848 (80010108) Method "Show" of object failed

    Quote Originally Posted by porucha vevrku View Post
    You must first create a "UserForm" with its objects (text boxes, lists, buttons, etc.) and adapt the code to the names you give these objects in "UserForm".
    To expand on this, it appears that brockbaker27 simply declared a UserForm object, but the way to do this is to create a UserForm in the VBA design window, to reproduce the original DialogSheet. A declaration for the UserForm is not needed, just use the name of the UserForm in the code.

    The Show method for a UserForm does not return a value. You are treating it as a Boolean function. You will have to redesign this aspect to have the form indicate whether something was entered. I assume that is if the user hit OK instead of Cancel. You can add a public variable in the UserForm code to indicate it. I usually do something like this:

    Please Login or Register  to view this content.
    Then
    Please Login or Register  to view this content.

  15. #15
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Run-time error -2147417848 (80010108) Method "Show" of object failed

    I have posted in the Microsoft Community and it seems that this is a widespread issue due to the update. I have not been able to determine if it was deliberate.

  16. #16
    Registered User
    Join Date
    01-11-2021
    Location
    Hemet, CA
    MS-Off Ver
    Office 365
    Posts
    4

    Re: Run-time error -2147417848 (80010108) Method "Show" of object failed

    We cannot wait for microsoft to come out with a fix so I am changing our code to userforms, there
    are quite a few in the program.
    Last edited by brockbaker27; 01-15-2021 at 01:33 PM.

+ 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. [SOLVED] Run-time error '-2147417848(80010108) : Method 'Formula' of object 'Range' failed
    By Norlina Deli in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 01-24-2019, 05:54 AM
  2. [SOLVED] run time error -2147417848 (80010108) Method 'Formula' on object 'Series' failed
    By dluhut in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 10-12-2016, 02:11 PM
  3. Run-time error '-2147417848 (80010108)' Method 'Formula' of object 'Range failed
    By JessKong1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-03-2016, 02:02 AM
  4. Run-time error -2147417848 (80010108) Method Value of object Range failed
    By Arito in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-17-2015, 02:10 PM
  5. Runtime Error 2147417848(80010108) Method Autofill of Object Range failed
    By seejohn in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-10-2014, 08:03 AM
  6. "Runtime error '-2147417848 (80010108)' Method 'find' of object 'Range' failed"
    By excelworker_1 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 06-14-2012, 09:53 AM
  7. Replies: 7
    Last Post: 08-24-2005, 11: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