Fix: Compile Error: The Code in This Project Must Be Updated to Use on 64-Bit Systems
You may receive an error when you try to run, edit a macro, or compile Microsoft Visual Basic Application (VBA) code.
Microsoft Visual Basic For Applications
The code in this project must be updated for use on 64-bit systems. Please review and update the Declare statements and then mark them with the PtrSafe attribute.
You can choose to ignore the “Compile Error” and click Ok. You can still run the VBA macro in the 64-bit version of Office 2010.
To fix the error from re-appearing, add PtrSafe to the first line of your function. Finally, refer to the compatibility between the 32-bit and 64-bit versions of Office 2010 here.