View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Populate an array with sheet names?

One way:

Option Explicit
Sub testme01()
Dim myArr() As String
Dim iCtr As Long

With ActiveWorkbook
ReDim myArr(1 To .Worksheets.Count)
For iCtr = 1 To .Worksheets.Count
myArr(iCtr) = .Worksheets(iCtr).Name
Next iCtr
End With

End Sub

Steve wrote:

I would like to get the tab names in a worksheet into an array. How do I
program this?


--

Dave Peterson