|
Referring to Sheets by Index Number in Microsoft Excel using a macro An index number is a sequential number assigned to an Excel sheet, based on the position of its sheet tab (counting from the left) among the Excel sheets of the same type. The following procedure uses the Worksheets property to activate worksheet one in the active Excel workbook. Sub FirstOne() Worksheets(1).Activate End Sub If you want to work with all types of sheets in Microsoft Excel(worksheets, charts, modules, and dialog sheets), use the Sheets property. The following procedure activates Excel sheet three in the workbook as also demonstrated in the Excel training video. Sub ThirdOne() Sheets(3).Activate End Sub Note: The index order can change if you move, add, or delete the Excel sheets. |
![]()
Custom Search
|