+ Reply to Thread
Results 1 to 4 of 4

Hooks into MsgBox 64 Bit

  1. #1
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,952

    Hooks into MsgBox 64 Bit

    I don't remember where I got the attached file, but it was made for 32-Bit, and at work we're running 64-Bit. I've tried to update the code, but I'm getting an error 453 message when I try to run the "TestCustomMessageBox" macro, and I don't know enough to fix it so hope someone at the forum can.

    The message is "Can't find DLL entry point GetWindowLongptrA in user32".

    I THINK the problem is the "A" in "GetWindowLongptrA" but don't know how to rectify that.

    When I go to Debug it highlights the function at the red line below:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    I know I'm not stupid, but I suspect I'm a lot stupider than I think I am

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: Hooks into MsgBox 64 Bit

    Here, try attached. Replaced all instance of "Long" with "LongPtr".
    Gave me message box without any error on my end.

    Have a read of link for more detail on 32 bit to 64 bit conversion.
    https://msdn.microsoft.com/en-us/lib...ffice.14).aspx
    Attached Files Attached Files
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  3. #3
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,952

    Re: Hooks into MsgBox 64 Bit

    That's so weird; replacing "Long" with "LongPtr" is what I did as well (see the code segment I originally posted). Maybe I missed one?

    Thanks so much for your help on this.

  4. #4
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: Hooks into MsgBox 64 Bit

    You are welcome, and thanks for the rep

    And yes, likely issue is that you missed those Declare functions that reside outside of your main sub.

+ 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] need help finding cause of a corrupted excel file which hooks up to databases
    By jrtaylor in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-15-2018, 10:28 PM
  2. Excel VBA - replace excel msgbox with self msgbox
    By dluhut in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-24-2017, 02:34 PM
  3. [SOLVED] Scrabble hooks summary
    By makinmomb in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-10-2017, 10:04 AM
  4. Macro to capture MsgBox prompt to a string variable but ignore the MsgBox
    By BuglerDobbs in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-07-2015, 10:56 AM
  5. [SOLVED] Problem with VBA Editor uses lower case on some lines (ex. msgbox instead of MsgBox)
    By stubbsj in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-14-2013, 06:59 PM
  6. MsgBox-center the message on a msgbox
    By CobraLAD in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-11-2007, 06:48 AM
  7. [SOLVED] MsgBox-at the end a msgBox popup
    By CC in forum Excel General
    Replies: 4
    Last Post: 05-05-2006, 12:50 PM

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