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
Related examples in the same category