November 2007
Intermediate to advanced
408 pages
11h 3m
English
IN THIS CHAPTER
Measuring the Lifetime of a Variable or Constant 121
Case Study: Tracking the Current User 126
The dictionary defines scope as extent of treatment, activity, or influence; range of operation. In VBA terms, scope covers where, within your VBA, a variable can operate or have influence. In Chapter 5, “Building Procedures,” in the section “Public Versus Private,” we discussed the scope of procedures. Variables function similarly using the concepts of scope and lifetime. A variable’s scope defines how other code within your application can see it. The lifetime of a variable dictates when it contains valid data.
A variable’s scope ...
Read now
Unlock full access