Scope & Lifetime of a Variable

Scope

Where in the application's code the variable can be used

Lifetime

How long the variable remains in the computers internal memory.

Procedure-Level Variable

Has procedure scope becuase only that procedure can use the variable. See Figure 3.10

Module-Level Variable

Has module scope because it can be used by all of the procedures in the form. See Figure 3.11

Block-Level Variables

Has block scope because it can be used by block of code If...THen...Else or For...Next