Dynamic Arrays for worksheet name
Option Base 1
Sub MySheets()
Dim myArray() As String
Dim myCount As Integer, NumShts As Integer
NumShts = ActiveWorkbook.Worksheets.count
ReDim myArray(1 To NumShts)
For myCount = 1 To NumShts
myArray(myCount) = ActiveWorkbook.Sheets(myCount).name
Next myCount
End Sub
Related examples in the same category