Compiler Constants

   

Visual Basic for Applications defines constants for exclusive use with the #If...Then...#Else directive. These constants are functionally equivalent to constants defined with the #If...Then...#Else directive except that they are global in scope; that is, they apply everywhere in a project.

On 16-bit development platforms, the compiler constants are defined as follows:

Constant Value Description
Win16 True Indicates development environment is 16-bit.
Win32 False Indicates that the development environment is not 32-bit.

On 32-bit development platforms, the compiler constants are defined as follows:

Constant Value Description
Win16 False Indicates that the development environment is not 16-bit.
Win32 True Indicates that the development environment is 32-bit.

Note   These constants are provided by Visual Basic, so you cannot define your own constants with these same names at any level.