Microsoft Office Tutorials and References
In Depth Information
Table 18-2. Members That Return Objects
Let us discuss some of the members in Table 18-1 .
Activate method
This method activates the worksheet, as in:
AutoFilterMode property
This property is True if the AutoFilter drop-down arrows are currently displayed on the
worksheet. (Also see the FilterMode property, discussed later in this section). Note that
we can set this property to False to remove the arrows, but we cannot set it to True . To
display the AutoFilter arrows, we use the AutoFilter method, which is discussed in
Chapter 19 .
Calculate method
This method calculates all cells in the worksheet. (Note that the method applies to
workbooks and specific ranges as well.) The syntax is simply:
WorksheetObject .Calculate
CodeName property
This property returns the code name for the worksheet (it also applies to workbook and
chart objects). The code name can be used in place of any expression that returns the
worksheet. The code name can also be set in the Properties window. It is referred to as
(name) to distinguish it from the Name property.
To illustrate, suppose that we have a worksheet whose code name is SheetCodeName and
whose name is SheetName. Then the following are equivalent:
Note that when we first create a worksheet, the name and code name are the same. The
two names can then be changed independently. However, the code name can be changed
only at design time; it cannot be changed with code at run time.
Copy method
The Copy method has multiple syntaxes. To copy a worksheet, we use the syntax:
WorksheetObject .Copy( Before , After )
where the optional Before parameter is the sheet before which the copied sheet will be
placed and the After parameter is the sheet after which the copied sheet will be placed.
(Only one of Before or After is allowed at one time.)
Search JabSto ::

Custom Search