Building an Expression from Scratch
A few simple rules will help you build expressions from scratch. You can use Help to see the object model and to find the accessors for the objects you want to return. Remember the following guidelines when you build expressions from scratch:
- Many accessors have the same name as the collection they apply to (Workbooks collection and Workbooks method, for example).
- Each object topic in Help contains a partial view of the object model so that you can locate the object in the hierarchy. The topics also contain information about the accessors, plus sample code showing how to use the object.
- The Application property (which returns the Application object) is usually optional.
- If you omit the Workbooks accessor method, the expression uses the active workbook.
- If you omit the Worksheets (or Sheets) accessor method as well as the Workbooks accessor method, the expression uses the active sheet in the active workbook.