+ Reply to Thread
Results 1 to 4 of 4

Variables Definition Trying to run code but it crashes | Help Need

  1. #1
    Registered User
    Join Date
    02-06-2013
    Location
    Mexico
    MS-Off Ver
    MS Office 2016
    Posts
    99

    Exclamation Variables Definition Trying to run code but it crashes | Help Need

    Experts!

    I need your help to solve an issue when i load a file with Macro, I know something in this variable declaration for different Office Versions CRASHES. But not in all Office versions, it crashes in specific at: Office 16 Build: 14931 / 64 Bits at W10 x64

    2022-03-04_11h44_07.png

    Error Code:
    System Error &H8000FFF (-2147418113)


    As well, i hope i declare a long as LongPtr or something not properly declared or placed in the proper IF statement... can anyone take a look and help me to solve it?

    Code in Attached File.
    Attached Files Attached Files
    Last edited by pacosalasv; 03-08-2022 at 01:58 PM.

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

    Re: Variables Definition Trying to run code but it crashes | Help Need

    Give us a hint for how to run your code and reproduce the error. All I see are API function declarations.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,996

    Re: Variables Definition Trying to run code but it crashes | Help Need

    I suggest you get the relevant WinAPI document from MS and go through those carefully. Just from a quick glance I can see a few handles that should be LongPtr but are Long
    Everyone who confuses correlation and causation ends up dead.

  4. #4
    Registered User
    Join Date
    02-06-2013
    Location
    Mexico
    MS-Off Ver
    MS Office 2016
    Posts
    99

    Wink Re: Variables Definition Trying to run code but it crashes | Help Need

    Quote Originally Posted by rorya View Post
    I suggest you get the relevant WinAPI document from MS and go through those carefully. Just from a quick glance I can see a few handles that should be LongPtr but are Long
    Thanks for your suggestions, based on it. I checked one by one each of the variables and find the ones that supposed to be LongPtr as you mention and now it Works!

    Attached the updated file with variables re-organized and updated (Just in case some one need them)
    Attached Files Attached Files

+ 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. Excel crashes when trying to remove static variables
    By excelicus in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-22-2018, 09:57 AM
  2. can't figure out why this code crashes
    By bd3161 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-11-2016, 09:18 AM
  3. This simple (?) code crashes
    By blumesan in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 09-23-2014, 06:45 PM
  4. Variables to multiple cells on multiple sheets
    By BoBoCoDeR in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-06-2012, 05:02 PM
  5. Unzip Code - Works without Variables, Breaks with Variables...
    By AdamParker in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-06-2009, 02:35 PM
  6. [SOLVED] inserting code into code module crashes
    By Kris in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-25-2006, 01:30 PM
  7. [SOLVED] Object definition and structure, with variables
    By Neal Zimm in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-24-2005, 06:07 AM

Tags for this Thread

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