% Lo liminating the need to remember required syntax, the Object Browser enables you to quickly search for an object, property, or method that matches a desired keyword. For example, to add a new worksheet when you do not remember the appropriate method, you can use the search option on the Object Browser to find all objects that deal with the Add method.
The Object Browser refers to each object as a class and lists them within the Classes list box. The Object Browser lists all properties and methods associated with an object selected in the Classes list box within the Members list box. You view the associated properties and methods of an object by selecting the object. The Members list box also shows which VBA functions you can use to return the selected object.
The Object Browser has six different object libraries, which you can use to view object information: Excel, MSForms, Office, Stdole, VBA, and VBA project. You can view all information by selecting the All Libraries option, or you can select an individual object library.
The Excel object library contains all of the objects, methods, and properties in the Excel Object Model. These are the objects discussed throughout this book.
Select the MSForms object library to view objects that you can use to create custom dialog boxes for your macros.
The Office object library contains objects that are common to all Microsoft Office products.
Select the Stdole object library to find objects that you can use for OLE automation.
The VBA object library contains specific Visual Basic for Applications objects.
Each open workbook and the corresponding modules are listed as available objects under VBAProject.
USING THE OBJECT BROWSER
Module 1 Mot
Alphabetic | I Mo du
View | Insert Format Debug □ Code F7
m Object Shift+F7
lit ion Shift+F2
SONAL.XLS - Module 1 (Code)
P Immediate Wind«
IT! Locals Window
Jp Watch Window fo, Call Stack...
I Tab Order Toolbars
I Calculate Expenses
ActiveCell.For Hange ("B3 :H3") Select ion. Nuirib id Sub aï-iLJ
OPEN THE OBJECT BROWSER
D Open the Code window for the desired module.
Was this article helpful?