Q1: | Explain the purpose of the General Declarations section of a module. |
A1:
| The General Declarations section is where you declare variables and constants that you want to be visible to all functions and subroutines in a module. |
Q2: | Explain the purpose of the Option Explicit statement. |
A2:
| The Option Explicit statement requires that you declare all variables before you use them. This reduces the number of errors in programming code. |
Q3: | Explain the difference between the scope and the lifetime of a variable. |
A3:
| Scope refers to where the compiler can see a variable, whereas lifetime refers to how long the variable remains in memory. |
Q4: | Explain the difference between a subroutine and a function. |
A4:
| A subroutine does not return a value, whereas a function does return a value. |