Specify PtrSafe to use both 32bit and 64bit Excel when importing Windows API
Learn about the Windows API PtrSafe declaration. When coding with Excel VBA, you can check the causes and solutions of PtrSafe-related errors that you occasionally encounter while importing and using Windows APIs. 1. Example code for Windows API PtrSafe error This is the code that imports and declares Windows API Sleep, OutputDebugString. (reference:...