VBA – If Statement
An If statement consists of a Boolean expression followed by one or more statements. If the condition is said to be True, the statements under If condition(s) are executed. If…
An If statement consists of a Boolean expression followed by one or more statements. If the condition is said to be True, the statements under If condition(s) are executed. If…
Decision-making allows the programmers to control the execution flow of a script or one of its sections. The execution is governed by one or more conditional statements. Following is the…
Following Concatenation operators are supported by VBA. Assume variable A holds 5 and variable B holds 10 then − OperatorDescriptionExample+Adds two Values as Variable. Values are NumericA + B will…
Following logical operators are supported by VBA. Assume variable A holds 10 and variable B holds 0, then − OperatorDescriptionExampleANDCalled Logical AND operator. If both the conditions are True, then…
There are the following comparison operators supported by VBA. Assume variable A holds 10 and variable B holds 20, then − OperatorDescriptionExample=Checks if the value of the two operands are…
Following arithmetic operators are supported by VBA. Assume variable A holds 5 and variable B holds 10, then − OperatorDescriptionExample+Adds the two operandsA + B will give 15-Subtracts the second…
An Operator can be defined using a simple expression - 4 + 5 is equal to 9. Here, 4 and 5 are called operands and + is called operator. VBA supports the following types of…
Constant is a named memory location used to hold a value that CANNOT be changed during the script execution. If a user tries to change a Constant value, the script…
Variables are a named memory location used to hold a value that can be changed during the script execution. Following are the basic rules for naming a variable. You must use…
The InputBox function prompts the users to enter values. After entering the values, if the user clicks the OK button or presses ENTER on the keyboard, the InputBox function will return the…