Search notes:

VBA: win16, win32 and win64 predefined compiler directive constants

VBA defines some of the predefined compiler directive constants depending on the bitness of Office that hosts the VBA environment.
This allows a programmer to create specific code for the target bitness sing #if winX then … #end if.
option explicit

sub main() ' {

    #if win16 then
        debug.print "win16 is defined"
    #end if

    #if win32 then
        debug.print "win32 is defined"
    #end if

    #if win64 then
        debug.print "win64 is defined"
    #end if

end sub ' }
Github repository about-VBA, path: /compiler-directives/winX/Office-bitness.bas
The win16, win32 and win64 directives have the following truthy values on different environments according to their bitness:
Environment win64 win32 win16
64-bit true true false
32-bit false true false
16-bit false false true

See also

Conditional compilation in VBA
VBA: 32-bit vs 64-bit

Index