Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default Populate an array with sheet names?

I would like to get the tab names in a worksheet into an array. How do I
program this?
  #2   Report Post  
Posted to microsoft.public.excel.programming
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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Populate Excel Userform with Sheet names PC[_3_] Excel Programming 2 February 16th 05 02:15 PM
populate combobox with sheet names David Goodall Excel Programming 3 September 12th 04 12:37 PM
populate combobox with sheet names David Goodall Excel Programming 0 September 12th 04 08:55 AM
Populate cell values with sheet names Oli Oshiz Excel Programming 0 August 13th 04 06:24 PM
Need to randomly populate a 10x10 array of cells with 100 names - 5 people listed 20 times each... Kevin Lyons[_2_] Excel Programming 3 February 8th 04 08:28 PM


All times are GMT +1. The time now is 10:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"