View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Custom List to Define Sheet Tab Names

Marv,

Here is one way.

In this example, I have assumed that the first item in the list is TabNames,
so that we can pinpoint the list

Dim i As Long, j As Long
Dim ary

For i = 1 To Application.CustomListCount
ary = Application.GetCustomListContents(i)
If ary(LBound(ary)) = "TabNames" Then
For j = 2 To UBound(ary)
If j - 1 <= ActiveWorkbook.Worksheets.Count Then
Worksheets(j - 1).Name = ary(j)
End If
Next j
End If
Next i

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"MarvInBoise" wrote in message
...
Would like to use a custom list, or a range name, or simply a range with
names to define my worksheet names via VBA; can do?
--
Marv Lusk
Boise Corporation