Page 87 - Excel Progamming Weekend Crash Course
P. 87
d540629 ch04.qxd 9/2/03 9:28 AM Page 62
62 Friday Evening
REVIEW
Almost any Excel program needs to work with data, and VBA provides a lot of flexibility in
this regard. Numerous data types provide storage for all kinds of data, including numbers,
text, dates, and object references. Among the things you learned in this session are:
The fundamental syntax of VBA, including the use of comments.
How to use literal and symbolic constants.
VBA’s naming rules.
How to declare variables.
Types of numeric, string, and object variables.
About variable scope.
How to create and use static and dynamic arrays.
Defining user-defined types and enumerations.
QUIZ YOURSELF
1. How do you split a VBA statement over two or more lines? (See the “VBA Syntax
Fundamentals” section.)
2. What are the two ways to create a comment? (See the “Comments” section.)
3. Name two advantages of symbolic constants. (See the “Employing Constants” section.)
4. Should you use the Option Explicit statement in your programs? Why? (See the
“Variable Declaration and Option Explicit” sidebar.)
5. What data type is designed to hold money values? (See the “Numeric Variables”
section.)
6. What statement is used to create a user-defined type? (See the “User-Defined
Types” section.)
7. When should you use the Object data type? (See the “Object Variables” section.)
8. What does the term variable scope refer to? (See the “Understanding Variable
Scope” section.)