Big Chemical Encyclopedia

Chemical substances, components, reactions, process design ...

Articles Figures Tables About

You Can Define Your Own Objects

VBA allows you to equate a variable to an object, but the variable does not automatically become an object. If you then attempt to use the variable in an expression that requires an object, youll get an Object required error message. The Set command lets you define a variable or property as an object. The following example makes the InputBox method return an Object (so that you can use its Address property in addition to its Value property, for example)  [Pg.257]

Objects have properties that can be set or read. Some properties of the Range object are the ColumnWidth property, the NumberFormat property, the Font property, the Value property. A property is connected to the object it modifies by a period, e.g., [Pg.257]


To specify the range of cells to use as data labels, we ll use the InputBox method. We ll define the range as an object variable, so that we can use a For...Each...Next loop. For a code example, see "You Can Define Your Own Objects" in Chapter 14. To convert SeriesCollection(l) into the general case, remember that a specific item in a collection can be referred to by its index number or by its name. We ll use the code... [Pg.297]


See other pages where You Can Define Your Own Objects is mentioned: [Pg.257]    [Pg.257]   


SEARCH



Your Objectives

© 2024 chempedia.info