Using Object Variables

Object variables occupy an important place in VBA for Excel, and later in this book when database structures are discussed, they assume even greater importance. It's possible to use VBA effectively without knowing how to use object variables, but it isn't easy.

Understanding Object Variables

Consider the notion of age as a variable. It's something you measure when you're dealing with information about people. If you're issuing them driver's licenses, you measure their age. If you hire them, you put their age—at least, their date of birth—in a file. If you're meeting them socially, you make a mental note with a rough estimate of their age.

Age is a variable. It varies from person to person. Each person has an age: 75 years, ...

Get Managing Data with Microsoft® Excel now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.