Statements. The Or. (Converse statement) The converse is true. If I have 3 fields on a form. Examples of VBA IF Statement. The basic conditional statement in Visual Basic begins with the keyword If followed by a Boolean expression and the keyword Then. Using IF statement with And & Or operators: This section describes the syntax of conditional statements used by the MsiEvaluateCondition function and the action sequence tables. document.writeln ("Display the edit button.") VBA Conditional FormattingNow from the first drop down select Worksheet which will be General by default and from select dropdown it will automatically select the option SelectionChange as shown below. Once we do that, it will automatically activate the private subcategory and Target cell would be as Range. Now write the code firstly define a variable MyRange as Range. More items #1) VBScript IfEnd If Statement. You use declaration statements to name and define procedures, variables, arrays, and constants. In visual basic. Example 2 Highlight Cells with Negative Values. Example 3: Using other functions within the VBA IF Function. (conditional statement) ~If two lines never meet, then they are parallel. Select 'Use a Lets look at a simple example: If Range ("a2"). Example: Dave thinks his polygon is a triangle. End If. Once it finds one that matches, it would execute the corresponding Statement. In Geometry the conditional statement is referred to as p q. An example would for conditional statement be as follows: Example 1: Using less than '<' operator with the VBA IF Function. The Set keyword is required. Select case. Step 1) Copy the code into your editor