convert macro from 32 bit Excel to 64 bit Excel

timbertom

New member
Hi
I've read that all the Declare statements have to become "PtrSafe Declare" and the Long statements to become "LongPtr". I made these changes in the VBA modules and still get error messages. Has anybody here done conversions of XLA files before so they function on 64 bit Excel? Thank you.
 
Hi
I've read that all the Declare statements have to become "PtrSafe Declare" and the Long statements to become "LongPtr". I made these changes in the VBA modules and still get error messages. Has anybody here done conversions of XLA files before so they function on 64 bit Excel? Thank you.
Dear Timbetom,

Thank you for posting your query on our Exceldemy forum. Without seeing your code, it's difficult to diagnose the problem accurately. You're right that when converting code from 32 bits to 64 bits, all the Declare statements need to be updated to "PtrSafe Declare". Additionally, the data types in the Declare statement (parameters and return values) that store 64-bit quantities should be changed to LongLong for 64-bit integrals or LongPtr for pointers and handles (Source).

Could you please share your code with us so that we can examine it closely and provide you with a solution? We look forward to hearing back from you.

Best regards,
 

Online statistics

Members online
1
Guests online
18
Total visitors
19

Forum statistics

Threads
292
Messages
1,268
Members
531
Latest member
lonkfps
Top