Sheets Object
Office 2007
| Excel Developer Reference |
Remarks
The Sheets collection can contain Chart or Worksheet objects.
The Sheets collection is useful when you want to return sheets of any type. If you need to work with sheets of only one type, see the object topic for that sheet type.
Example
Use the Sheets property to return the Sheets collection. The following example prints all sheets in the active workbook.
| Visual Basic for Applications |
|---|
|
Use the Add method to create a new sheet and add it to the collection. The following example adds two chart sheets to the active workbook, placing them after sheet two in the workbook.
| Visual Basic for Applications |
|---|
|
Use Sheets(
| Visual Basic for Applications |
|---|
|
Use Sheets(
| Visual Basic for Applications |
|---|
|