Multiple objects![]() ![]() ![]() |
A collection of all the Worksheet objects in the workbook. Each Worksheet object represents a worksheet.
Use the Worksheets property of Spreadsheet or Workbook object to return the Worksheets collection.
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 Spreadsheet1.
Spreadsheet1.Worksheets.Add _
Spreadsheet1.Worksheets(1), ,2
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 Spreadsheet1.
Spreadsheet1.Worksheets(1).Visible = False
The Worksheet object is also a member of the Sheets collection.