/define:name=value[,name=value]
-or-
/d:name=value[,name=value]
The /define option has the same effect as using a #Const preprocessor directive in your source file.
You can use symbols created by this option with the #If...Then...#Else Directive to compile source files conditionally.
/d is the short form of /define.
You can define multiple symbols with /define by using a comma to separate symbol names.
Define two conditional compiler constants:
Vbc /define:DEBUGMODE=True,TRAPERRORS=False test.vb
Use the two constants:
Sub mysub() #If debugmode Then '. Place debug statements here. MsgBox("debug mode") #Else '. Place default statements here. '. #End If End Sub
Visual Basic Compiler Options | #If...Then...#Else Directive