5.6.16.2 Conditional Compilation Expressions

A conditional compilation expression is an expression usable within conditional compilation statements.

 cc-expression = expression 

Static semantics. The semantics of conditional compilation expressions are only defined when <expression> is composed solely of the following constructs:

§ Numeric, String, Date, Empty, Null, or Nothing literal.

§ Reference to a conditional compilation constant.

§ Parenthesized subexpression, provided the subexpression is itself valid as a conditional compilation expression.

§ The - and Not unary operators, provided the operand is itself valid as a conditional compilation expression.

§ The +, -, *, ^, Mod, /, \, &, And, Or, Xor, Eqv, Imp, =, <, >, <>, <=, => or Like, provided each operand is itself valid as a conditional compilation expression.

§ The Is binary operator, provided each operand is itself valid as a conditional compilation expression.

§ Simple name expression invoking the VBA intrinsic function Int, Fix, Abs, Sgn, Len, LenB, CBool, CByte, CCur, CDate, CDbl, CInt, CLng, CLngLng, CLngPtr, CSng, CStr or CVar.

References within conditional compilation expressions might not refer to the implicit With block variable.

The constant value of a conditional compilation expression is determined statically by evaluating <expression> as if it was being evaluated at runtime with conditional compilation constants being replaced by their defined values.