Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,564
- Office Version
- 365
- 2016
- Platform
- Windows
I am trying to determine the index numbers of each of the worksheets in my workbook. I am trying to use this code to do so. But I'm getting an error ("Object doesn't support this property or method.") with the line in red.
Thoughts?
Rich (BB code):
Sub GetActiveSheetIndex()
Dim sht As Worksheet
For Each sht In ThisWorkbook
shtin = sht.Index
shtname = sht.Name
MsgBox "Sheet: " & shtname & " (" & shtin & ")"
Next sht
End Sub
Thoughts?