Have you consulted Philipp Steifel's YouTube presentation and blog articles on this subject?
VBA Compile error when using #IF Win64 then Public Declare Sub Sleep Lib "kernel32"
This has been bugging me for a while now and I have been unable to resolve this compile error. I am running Windows 10 Enterprise 64bit. My version of Office is Microsoft 365 Apps for Enterprise. The issue is when I try to use the conditional directive to declare the sleep sub. I am getting the compile error below. I have tried using VBA7 and Win64 separately as well together as below with the same result. I created a blank module and placed only code below to duplicate the error.
For now I am commenting out the 32 bit line, but would like to find a way to resolve this. I appreciate any insights into this.
Microsoft 365 and Office | Access | For home | Windows
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
6 additional answers
Sort by: Most helpful
-
Anonymous
2020-12-10T22:13:16+00:00 Thanks for this video. It was very informative and addressed my issue. Have a great day.
-
George Hepworth 22,220 Reputation points Volunteer Moderator2020-12-11T05:34:52+00:00 I'm glad you found it useful. IMO, it's the best available resource on the subject of 64 bit VBA.