Understanding Variables, Data Types, and Constants

Saving Results of VBA Statements ■ What Are Variables? ■ Data Types ■ How to Create Variables ■ How to Declare Variables ■ Specifying the Data Type of a Variable ■ Assigning Values to Variables ■ Forcing Declaration of Variables ■ Understanding the Scope of Variables ■ Procedure-Level (Local) Variables ■ Module-Level Variables ■ Project-Level Variables ■ Lifetime of Variables ■ Understanding and Using Static Variables ■ Declaring and Using Object Variables ■ Using Specific Object Variables ■ Finding a Variable Definition ■ Using Constants in VBA Procedures ■ Built-in Constants ■ What's Next...

In programming, just as in life, certain things need to be done at once while other tasks can be put off until later. When you postpone a task, you may enter it in your mental or paper "to-do" list. The individual entries on your list are often classified by their type or importance. When you delegate the task or finally get around to doing it, you cross it off the list. This chapter shows you how your VBA procedures can memorize important pieces of information for use in later statements or calculations. You will learn how a procedure can keep a "to-do" entry in a variable, how variables are declared, and how they relate to data types and constants.

0 0

Post a comment