Global Members

Many of the properties and methods of the Application object can be used without qualifying them with the word Application. These are called global members . For instance, the Selection property is global, and so we can write:

Selection.Cells.Count instead of:

Application.Selection.Cells.Count

To identify the global members, the Excel object model has a special object called the Global object. This object is not used directly—its purpose is simply to identify the global members of the object model. Note that the members of the Global object form a proper subset of the members of the Application object (which means that not all of the members of the Application object are global).

Table 9-2 lists the (nonhidden) global members of the Excel object model

Table 9-2. Excel global members

_Evaluate

CommandBars

Parent

_Run2

Creator

Range

ActiveCell

DDEAppReturnCode

Rows

ActiveChart

DDEExecute

Run

ActiveDialog

DDEInitiate

Selection

ActiveMenuBar

DDEPoke

SendKeys

ActivePrinter

DDERequest

Sheets

Active Sheet

DDETerminate

ShortcutMenus

Active Window

Dialog Sheets

ThisWorkbook

Active Workbook

Evaluate

Toolbars

AddIns

Excel4IntlMacro Sheets

Union

Application

Excel4Macro Sheets

Windows

Assistant

ExecuteExcel4Macro

Workbooks

Calculate

Intersect

WorksheetFunction

Cells

MenuBars

Worksheets

Charts

Modules

Columns

Names

0 0

Post a comment