Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
4 out of 4 rated this helpful - Rate this topic

How to: Refer to Sheets by Index Number

Office 2007

An index number is a sequential number assigned to a sheet, based on the position of its sheet tab (counting from the left) among sheets of the same type. The following procedure uses the Worksheets property to activate worksheet one in the active workbook.

Sub FirstOne()
    Worksheets(1).Activate
End Sub

If you want to work with all types of sheets (worksheets, charts, modules, and dialog sheets), use the Sheets property. The following procedure activates sheet four in the workbook.

Sub FourthOne()
    Sheets(4).Activate
End Sub
Bb211414.vs_note(en-us,office.12).gif  Note
The index order can change if you move, add, or delete sheets.



Community Additions

Show:
© 2014 Microsoft. All rights reserved.