Worksheet Methods (Excel)

GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Methods

Name

Description

Activate

Makes the current sheet the active sheet.

Calculate

Calculates all open workbooks, a specific worksheet in a workbook, or a specified range of cells on a worksheet, as shown in the following table.

ChartObjects

Returns an object that represents either a single embedded chart (a ChartObject object) or a collection of all the embedded charts (a ChartObjects object) on the sheet.

CheckSpelling

Checks the spelling of an object.

CircleInvalid

Circles invalid entries on the worksheet.

ClearArrows

Clears the tracer arrows from the worksheet. Tracer arrows are added by using the auditing feature.

ClearCircles

Clears circles from invalid entries on the worksheet.

Copy

Copies the sheet to another location in the workbook.

Delete

Deletes the object.

Evaluate

Converts a Microsoft Excel name to an object or a value.

ExportAsFixedFormat

Exports to a file of the specified format.

Move

Moves the sheet to another location in the workbook.

OLEObjects

Returns an object that represents either a single OLE object (an OLEObject ) or a collection of all OLE objects (an OLEObjects collection) on the chart or sheet. Read-only.

Paste

Pastes the contents of the Clipboard onto the sheet.

PasteSpecial

Pastes the contents of the Clipboard onto the sheet, using a specified format. Use this method to paste data from other applications or to paste data in a specific format.

PivotTables

Returns an object that represents either a single PivotTable report (a PivotTable object) or a collection of all the PivotTable reports (a PivotTables object) on a worksheet. Read-only.

PivotTableWizard

Creates a new PivotTable report. This method doesn’t display the PivotTable Wizard. This method isn’t available for OLE DB data sources. Use the Add method to add a PivotTable cache, and then create a PivotTable report based on the cache.

PrintOut

Prints the object.

PrintPreview

Shows a preview of the object as it would look when printed.

Protect

Protects a worksheet so that it cannot be modified.

ResetAllPageBreaks

Resets all page breaks on the specified worksheet.

SaveAs

Saves changes to the chart or worksheet in a different file.

Scenarios

Returns an object that represents either a single scenario (a Scenario object) or a collection of scenarios (a Scenarios object) on the worksheet.

Select

Selects the object.

SetBackgroundPicture

Sets the background graphic for a worksheet.

ShowAllData

Makes all rows of the currently filtered list visible. If AutoFilter is in use, this method changes the arrows to "All."

ShowDataForm

Displays the data form associated with the worksheet.

Unprotect

Removes protection from a sheet or workbook. This method has no effect if the sheet or workbook isn't protected.

XmlDataQuery

Returns a Range object that represents the cells mapped to a particular XPath. Returns Nothing if the specified XPath has not been mapped to the worksheet, or if the mapped range is empty.

XmlMapQuery

Returns a Range object that represents the cells mapped to a particular XPath. Returns Nothing if the specified XPath has not been mapped to the worksheet.