The Object Browser

After you have added a reference to a library, the classes contained in that library are available for viewing in the Object Browser. To see the Object Browser in the Visual Basic Editor, select View O Object Browser or press F2. The Visual Basic Editor displays the Object Browser as shown in Figure B-2.

jgf Object Browser In 11131 IS!

j<AII Libraries>

<1 1 fl

|recordset

~~3 Ufa"

Search Results

Library

J Class

| Member

]

Iff* ADODB

Si Recordset

m DAO Iff* DAO Vh DAO

S3 Recordset Recordset2 Si Recordsets

[

# VbFirstWeekOfYear VblMEStatus

-

Members ofVbMsgBoxStyle" [3 vbAbortRetrylgnore Zi vbAp plication Modal a vbCritical

*

j^iVbMsgBoxStyie ¿P VbQueryClose U6 VbStrCom M» VbTriState !£# VbVarType

a vbDefaultButtonl CD vbDefaultButton2 CD vbDefaultButton3 d) vbDefaultButton4 CD vbExclamation

3

¡f WorkspaceTypeEnui

EH vb Information

1

f> XactAttributeEnum

CD vbMsgBoxHelpButton |c=3 vbMsgBoxRight

Const vblnformation = 64 (&H40) Member of VBA.VbMsaBoxStvIe

Figure B-2

When you select an item in the Classes list, its properties and methods (its "members") display in the right pane. Select an item in the right pane and more specific information about that item displays in the bottom pane. For example, Figure B-2 shows that vbTextCompare is a constant with a value of 1 and is a member of VBA.VBCompareMethod.

You can specify which of the referenced libraries you want to browse by selecting it from the libraries drop-down list at the top of the Object Browser (see Figure B-3). That list starts with <All Libraries>.

If you are looking for a particular class, property, method, or declared constant, you can specify a portion of the string to search for in the text box below the libraries drop-down, and then click the Search icon (the binoculars) to find it. Figure B-4 shows the results of searching for recordset. Because <All Libraries> is selected, the class Recordset appears in both the DAO and ADO libraries.

Figure B-3
0 0

Post a comment