VBA Statements: The Building Blocks of VBA Programs
VBA programs are nothing but a sequence of VBA statements. They are the cornerstone of VBA programs. Here, we explore these vital elements of VBA coding.
Tags content that has to do with executable VBA statements that transfer program execution or control from one code-line to another and in or out of procedures.
VBA programs are nothing but a sequence of VBA statements. They are the cornerstone of VBA programs. Here, we explore these vital elements of VBA coding.
Here, you’ll explore the On Error Statement which transfers control to error-handling subroutines when a runtime error occurs.
Here, you’ll explore the On – GoSub statement which conditionally transfers control between a code-line and a subroutine in the same scope.
Here, you’ll explore the GoSub – Return statement which unconditionally transfers control between a code-line and a subroutine in the same scope.
Here, you’ll explore the On – GoTo statement which conditionally transfers control to any labelled statement within the same scope (i.e., procedure).
Here, you’ll explore the GoTo statement which unconditionally transfers control to any labelled statement in the same scope (i.e., procedure).
Here, you’ll explore the Call statement which transfers control between procedures and DLLs. It is a VBA jump statement for non-sequential code execution.
Here, you’ll explore the Exit statement which instantly leaves a block. It is one of several VBA jump statements that enables non-sequential code execution.