Thursday, January 31, 2019

VBA - Decisions

VBA - Decisions


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 general form of a typical decision making structure found in most of the programming languages.

VBA provides the following types of decision making statements. Click the following links to check their details.
S.No.Statement & Description
1if statement
An if statement consists of a Boolean expression followed by one or more statements.
2if..else statement
An if else statement consists of a Boolean expression followed by one or more statements. If the condition is True, the statements under If statements are executed. If the condition is false, the Elsepart of the script is executed.
3if...elseif..else statement
An if statement followed by one or more ElseIf statements, that consists of Boolean expressions and then followed by an optional else statement, which executes when all the condition become false.
4nested if statements
An if or elseif statement inside another if or elseif statement(s).
5switch statement
switch statement allows a variable to be tested for equality against a list of values.

No comments:

Post a Comment

No String Argument Constructor/Factory Method to Deserialize From String Value

  In this short article, we will cover in-depth the   JsonMappingException: no String-argument constructor/factory method to deserialize fro...