Conditional If

Conditional If...Then statements enable you to selectively compile and execute certain blocks of code. Conditional If statements can be used in various scenarios, such as when you want certain blocks of code to execute during testing but not in the release version, or when you're distributing your application in different regions and want certain code to apply in some regions but not others. The following is an example of the general syntax.

#If conLanguage = "English" Then

'The code specific to the English version of the software goes here. #ElseIf conLanguage = "Spanish" Then

'The code specific to the Spanish version of the software goes here. #Else

'The code specific to the remaining versions of the software goes here. #End If

0 0

Post a comment