Skip to content

Latest commit

 

History

History
70 lines (50 loc) · 2.19 KB

Excel.Worksheets.md

File metadata and controls

70 lines (50 loc) · 2.19 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Worksheets object (Excel)
vbaxl10.chm469072
vbaxl10.chm469072
Excel.Worksheets
5ec467a6-97e3-98d7-0b14-845d20c15910
04/03/2019
medium

Worksheets object (Excel)

A collection of all the Worksheet objects in the specified or active workbook. Each Worksheet object represents a worksheet.

Remarks

The Worksheet object is also a member of the Sheets collection. The Sheets collection contains all the sheets in the workbook (both chart sheets and worksheets).

Example

Use the Worksheets property of the Workbook object to return the Worksheets collection.The following example moves all the worksheets to the end of the workbook.

Worksheets.Move After:=Sheets(Sheets.Count)

Use the Add method to create a new worksheet and add it to the collection. The following example adds two new worksheets before sheet one of the active workbook.

Worksheets.Add Count:=2, Before:=Sheets(1)

Use Worksheets (index), where index is the worksheet index number or name, to return a single Worksheet object. The following example hides worksheet one in the active workbook.

Worksheets(1).Visible = False

Methods

Properties

See also

[!includeSupport and feedback]