工作表属性 (Excel)Workbook.Sheets property (Excel)

返回一个**Sheets** 集合, 该集合代表指定工作簿中的所有工作表。Returns a Sheets collection that represents all the sheets in the specified workbook. Sheets 对象,只读。Read-only Sheets object.

语法Syntax

表达式工作表expression.Sheets

_表达式_一个返回**工作簿** 对象的表达式。expression An expression that returns a Workbook object.

备注Remarks

在不使用对象识别符的情况下使用此属性等效于使用 ActiveWorkbook.SheetsUsing this property without an object qualifier is equivalent to using ActiveWorkbook.Sheets.

示例Example

此示例新建一张工作表,然后在第一列中列出活动工作簿中的工作表名称。This example creates a new worksheet and then places a list of the active workbook's sheet names in the first column.

Set newSheet = Sheets.Add(Type:=xlWorksheet) 
For i = 1 To Sheets.Count 
 newSheet.Cells(i, 1).Value = Sheets(i).Name 
Next i

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.