The Object Browser is a handy tool that lists every property and method for every object available. When the VBE is active, you can bring up the Object Browser in any of the following three ways:
♦ Choose the View ^ Object Browser command from the menu.
♦ Click the Object Browser tool on the Standard toolbar.
The Object Browser is shown in Figure 7-16.
The drop-down list in the upper-left corner of the Object Browser includes a list of all object libraries that you have access to:
♦ MSForms (used to create custom dialog boxes)
♦ Office (objects common to all Microsoft Office applications)
♦ Stdole (OLE automation objects)
♦ The current project (the project that's selected in the Project Explorer) and any workbooks referenced by that project
Your selection in this upper-left drop-down list determines what is displayed in the Classes window, and your selection in the Classes window determines what is visible in the members of window.
After you select a library, you can search for a particular text string to get a list of properties and methods that contain the text. You do so by entering the text in the second drop-down list and then clicking the binoculars (Search) icon. For example, assume that you're working on a project that manipulates cell comments:
1. Select the library of interest. If you're not sure which object library is appropriate, you can select <All Libraries>.
2. Enter Comment in the drop-down list below the library list.
3. Click the binoculars icon to begin the text search.
The Search Results window displays the matching text. Select an object to display its classes in the Classes window. Select a class to display its members (properties, methods, and constants). Pay attention to the bottom pane, which shows more information about the object. You can press F1 to go directly to the appropriate help topic.
The Object Browser might seem complex at first, but its usefulness to you will increase over time.
Was this article helpful?