3Understanding Program Variables

Your VBA procedures often need to store temporary values for use in statements and calculations that come later in the code. For example, you might want to store values for total sales and total expenses to use later in a gross margin calculation. Although you probably could get away with using the underlying application to store these values (in, say, a cell in an Excel worksheet), this almost always isn’t very practical. Instead, VBA (like all programming languages) lets you store temporary values in special memory locations called variables

Get Business Solutions VBA for the 2007 Microsoft Office System now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.