• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 33. Taking More Control of Your Macros > Declaring and Using Variables

Declaring and Using Variables

Just about any useful macro has to manage data. In VBA, you can work with many different types of data, including text, numbers, and logical data, as well as many custom data types defined in Word. It's often useful to reuse the same data items several times in a single macro. That's where variables come in.

A variable is a temporary storage location for a piece of data. You can think of a variable as a box in which you put the data until you want to come back and use it again. As its name implies, you can also change the value of a variable.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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