• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

VBA Programming Basics

The rest of this chapter gives you a very basic introduction to programming VBA code. What you learn won’t make you an expert VBA programmer by any means, but you’ll learn enough to write your own simple macros and understand the examples I take you through in Chapter 12.

Understanding Program Variables

Your VBA procedures often will need to store temporary values for use in later statements and calculations. 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 (for example, in a cell in an Excel worksheet), this almost always isn’t practical. Instead, VBA (like all programming languages) lets you store temporary values in variables.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint