Properties of a Comment object

The Comment object has five properties. Table 7-1 contains a list of these properties, along with a brief description of each. If a property is read-only, your VBA code can read the property but cannot change it.

Table 7-1: PROPERTIES OF A COMMENT OBJECT

Property

ReadOnly

Description

Application

Yes

Returns an object that represents the application that created the comment (that is, Excel).

Author

Yes

Returns the name of the person who created the comment.

Property

ReadOnly

Description

Parent

Yes

Returns the parent object for the comment. (It is always a Range object.)

Shape

Yes

Returns a Shape object that represents the shape attached to the comment.

Visible

No

Is True if the comment is visible.

Using the Help System

The easiest way to get specific help about a particular object, property, or method is to type the word in a code window and press F1. If there is any ambiguity about the word that you typed, you get a dialog box like the one shown in the following figure.

Unfortunately, the items listed in the dialog box are not always clear, so it may require some trial and error to locate the correct help topic. The dialog box in the figure appears when you type Comment and then press F1. In this case, although Comment is an object, it may behave like a property. Clicking the first item displays the help topic for the Comment object; clicking the second item displays the help topic for the Comment property.

Context Help

y

r-Vdmk raync« tf dw sendee iU* d hgvt l»i fifJid. F mm SdddtjB topfe ini -1;t>.

Lira y Object i-tüTooc

Caned

=ïee) Coiwiftl (ob)...

Eïïï! Comment

0 0

Post a comment