Objectoriented programming

In the real world, we use objects like televisions, mobile phones, compact disks and books everyday. In the same way, Excel and VBA uses objects -albeit non-physical in nature. If we think, for example, about a television set: the television has characteristics or properties associated with it, such as the size, the make, model, weight and colour. You can also do things to control the behaviour of this object, such as turn it on or off, adjust the volume, adjust the colour contrast or kick it (if it is annoying you that much). In VBA, we can refer to Excel/VBA objects in much the same way: that is, objects have properties associated with them and have things that can be done to them. The latter are called methods. In the case of Excel/VBA, the objects could be things like workbooks, worksheets, charts and cell ranges. We will look at properties and methods for these Excel/ VBA objects in the next sections. Those described in the next sections are not complete by any means.

0 0

Post a comment