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
2
Guests online
25
Total visitors
27

Forum statistics

Threads
318
Messages
1,408
Members
583
Latest member
mibr fan token
Top