If If the value of the constant Admn is set to True at compile time, Visual Basic compiles and runs the conditional code. Otherwise, Visual Basic ignores it. Note Unlike regular Visual Basic code, you can't use a colon to include other statements on the same line as a conditional compilation statement. The list should contain simple assignment statements separated by colons. True Conditional compilation constants have a special scope and cannot be accessed from standard code.
Any undeclared identifier used in a conditional compilation expression generates a compile error.
Using Conditional Compilation for Debugging You can use conditional compilation to avoid compiling debugging statements from the application you distribute to users. To do this, use conditional compilation to include these statements during development, and then ignore these statements in the version of your application that you distribute to users. The following example procedure uses these statements to display an assertion message when a function is passed a value it isn't designed to handle. You may use a function like this one while debugging your code. Once you've finished debugging your code and you're ready to distribute your application to users, you no longer need the function.