Use string text value as the compiler directive
#Const Language = "Spanish" Sub cmdConditionalCompilation_Click() #If Language = "Spanish" Then msgBox "Hola, Que Tal?" #Else msgBox "Hello, How Are You?" #End If End Sub
1. | With the compiler directive | ||
2. | Use #If | ||
3. | Use #Const to define the constant |