With the compiler directive : Compiler Directive « Language Basics « VBA / Excel / Access / Word






With the compiler directive

 
#Const Language = 1
Sub ConditionalIf()
   #If Language = 1 Then
      msgBox "Hola, Que Tal?"
   #Else
      msgBox "Hello, How Are You?"
   #End If
End Sub

 








Related examples in the same category

1.Use string text value as the compiler directive
2.Use #If
3.Use #Const to define the constant