Share via


Understanding the Worksheet Object

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Most of the work you will do in Microsoft® Excel will be within the context of a worksheet. A worksheet contains a grid of cells you can use to work with data and hundreds of properties, methods, and events you can use to work with the data in a worksheet.

To work with the data contained in a worksheet, in a cell or within a range of cells, you use a Range object. The Worksheet and Range objects are the two most basic and most important components of any custom application you create within Excel.

The Workbook object's Worksheets property returns a collection of all the worksheets in the workbook. The Workbook object's Sheets property returns a collection of all the worksheets and chart sheets in the workbook.

Each Excel workbook contains one or more Worksheet objects and can contain one or more chart sheets as well. Charts in Excel are either embedded in a worksheet or contained on a chart sheet. You can have only one chart on a chart sheet, but you can have multiple charts on a worksheet. Each embedded chart on a worksheet is a member of the Worksheet object's ChartObjects collection. Worksheet objects are contained in the Worksheets collection, which you can access by using the Workbook object's Worksheets property. When you use Microsoft® Visual Basic® for Applications (VBA) to create a new workbook, you can specify how many worksheets it will contain by using the Application object's SheetsInNewWorkbook property.

See Also

Working with Microsoft Excel Objects | Referring to a Worksheet Object | Adding, Deleting, Copying, and Moving a Worksheet Object | Understanding the Excel Application Object | Understanding the Workbook Object | Understanding the Range Object