The conditional compilation for VBA7 is necessary for LongPtr and PtrSafe because these keywords only exist in VBA7.
As for "just declare every long as LongPtr", you will get away with declaring most Long variables as LongPtr but not all of them.
If you are interested in the details, I recommend my text Windows API declarations in VBA for 64-bit. (It mentions Microsoft Access in some locations, but the same is also true Excel, Word, and any other VBA enabled application.)





Reply With Quote
