Workbook.Worksheets property (Excel)
Returns a Sheets collection that represents all the worksheets in the specified workbook. Read-only Sheets object.
expression A variable that represents a Workbook object.
Using this property without an object qualifier returns all the worksheets in the active workbook.
This example displays the value in cell A1 on Sheet1 in the active workbook.
This example displays the name of each worksheet in the active workbook.
For Each ws In Worksheets MsgBox ws.Name Next ws
This example adds a new worksheet to the active workbook and then sets the name of the worksheet.
Set newSheet = Worksheets.Add newSheet.Name = "current Budget"
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.