Sheets Methods

Name Returns Parameters Description

Adds a sheet to the collection. You can specify where the sheet goes by choosing which sheet object will be before the new sheet object (Before parameter) or after the new sheet (After parameter). The Count parameter decides how many sheets are created. The Type parameter can be used to specify the type of sheet using the XLSheetType constants

Copy

[Before], [After]

Adds a new copy of the currently active sheet to the position specified in the Before or After parameters

Delete

Deletes all the sheets in the

collection. Remember, a work-

book must contain at least one

sheet

FillAcross Sheets

RangeAs Range, Type As XlFillWith

Copies the values in the Range parameter to all the other sheets at the same location. The Type parameter can be used to specify whether cell contents, formulas, or everything is copied

Add Object [Before]

Name

Returns

Parameters

Description

Move

[Before], [After]

Moves the current sheet to the position specified by the parameters. See the Add method

PrintOut

[From], [To], [Copies], [Preview], [Active Printer], [Print ToFile], [Collate], [PrToFile Name]

Prints out the sheets in the collection. The printer, number of copies, collation, and whether a print preview is desired can be specified with the parameters. Also, the sheets can be printed to a file using the PrintToFile and PrToFileName parameters. The From and To parameters can be used to specify the range of printed pages

Print Preview

[Enable Changes]

Displays the current sheet in the collection in a print preview mode. Set the EnableChanges parameter to False to disable the Margins and Setup buttons, hence not allowing the viewer to modify the page setup

Select

[Replace]

Selects the current sheet in the collection

0 0

Post a comment