#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Worksheet Tab index

I have 15 or more worksheet tabs. How do I make a list/auto-populate of all
the name of the tabs on one worksheet to form the basis of an index?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Worksheet Tab index

sub toc()
for i=1 to sheets.count
cells(i,1).value=sheets(i).name
next i
end sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"S G Tan" wrote in message
...
I have 15 or more worksheet tabs. How do I make a list/auto-populate of all
the name of the tabs on one worksheet to form the basis of an index?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Worksheet Tab index

Don has given you code to get a list of sheets.

What do you want to do with this "index"?

You want to be able to select any sheet when you click on a name?

You can build a Sheet Navigation Toolbar as per Dave Peterson's code on
Debra Dalgleish's site. Sorts as well as navigates.

http://www.contextures.on.ca/xlToolbar01.html

Or see this google search thread for the BrowseSheets macro from Bob
Phillips.

http://tinyurl.com/yoa3dw


Gord Dibben MS Excel MVP

On Mon, 31 Aug 2009 14:22:01 -0700, S G Tan
wrote:

I have 15 or more worksheet tabs. How do I make a list/auto-populate of all
the name of the tabs on one worksheet to form the basis of an index?


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Worksheet Tab index

Many thanks to both of you.

"Gord Dibben" wrote:

Don has given you code to get a list of sheets.

What do you want to do with this "index"?

You want to be able to select any sheet when you click on a name?

You can build a Sheet Navigation Toolbar as per Dave Peterson's code on
Debra Dalgleish's site. Sorts as well as navigates.

http://www.contextures.on.ca/xlToolbar01.html

Or see this google search thread for the BrowseSheets macro from Bob
Phillips.

http://tinyurl.com/yoa3dw


Gord Dibben MS Excel MVP

On Mon, 31 Aug 2009 14:22:01 -0700, S G Tan
wrote:

I have 15 or more worksheet tabs. How do I make a list/auto-populate of all
the name of the tabs on one worksheet to form the basis of an index?



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Worksheet Tab index

When I do that, it defaults to the top of the page and start the list. Is it
possible to change the macro,so that it list the start of the TOC at the cell
that I specify?

"Don Guillett" wrote:

sub toc()
for i=1 to sheets.count
cells(i,1).value=sheets(i).name
next i
end sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"S G Tan" wrote in message
...
I have 15 or more worksheet tabs. How do I make a list/auto-populate of all
the name of the tabs on one worksheet to form the basis of an index?





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Worksheet Tab index

Sub toc()
Dim i, c, r As Long
r = ActiveCell.Row - 1
c = ActiveCell.Column
For i = 1 To Sheets.Count
Cells(i + r, c).Value = Sheets(i).Name
Next i
End Sub


Gord Dibben MS Excel MVP

On Tue, 1 Sep 2009 05:45:01 -0700, S G Tan
wrote:

When I do that, it defaults to the top of the page and start the list. Is it
possible to change the macro,so that it list the start of the TOC at the cell
that I specify?

"Don Guillett" wrote:

sub toc()
for i=1 to sheets.count
cells(i,1).value=sheets(i).name
next i
end sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"S G Tan" wrote in message
...
I have 15 or more worksheet tabs. How do I make a list/auto-populate of all
the name of the tabs on one worksheet to form the basis of an index?




  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Worksheet Tab index

thanks again - that worked.

"Gord Dibben" wrote:

Sub toc()
Dim i, c, r As Long
r = ActiveCell.Row - 1
c = ActiveCell.Column
For i = 1 To Sheets.Count
Cells(i + r, c).Value = Sheets(i).Name
Next i
End Sub


Gord Dibben MS Excel MVP

On Tue, 1 Sep 2009 05:45:01 -0700, S G Tan
wrote:

When I do that, it defaults to the top of the page and start the list. Is it
possible to change the macro,so that it list the start of the TOC at the cell
that I specify?

"Don Guillett" wrote:

sub toc()
for i=1 to sheets.count
cells(i,1).value=sheets(i).name
next i
end sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"S G Tan" wrote in message
...
I have 15 or more worksheet tabs. How do I make a list/auto-populate of all
the name of the tabs on one worksheet to form the basis of an index?




  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Worksheet Tab index

Could I trouble you again? Is it possible to produce that index and hyperlink
to the relevant tab?

"S G Tan" wrote:

thanks again - that worked.

"Gord Dibben" wrote:

Sub toc()
Dim i, c, r As Long
r = ActiveCell.Row - 1
c = ActiveCell.Column
For i = 1 To Sheets.Count
Cells(i + r, c).Value = Sheets(i).Name
Next i
End Sub


Gord Dibben MS Excel MVP

On Tue, 1 Sep 2009 05:45:01 -0700, S G Tan
wrote:

When I do that, it defaults to the top of the page and start the list. Is it
possible to change the macro,so that it list the start of the TOC at the cell
that I specify?

"Don Guillett" wrote:

sub toc()
for i=1 to sheets.count
cells(i,1).value=sheets(i).name
next i
end sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"S G Tan" wrote in message
...
I have 15 or more worksheet tabs. How do I make a list/auto-populate of all
the name of the tabs on one worksheet to form the basis of an index?




  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Worksheet Tab index

See David McRitchie's site for code to build a Table of Contents with
hyperlinks.

http://www.mvps.org/dmcritchie/excel...c.htm#BuildTOC

I still prefer the sheet navigator toolbar or browsesheets macro.

With a TOC how do you go back to TOC sheet after jumping to another sheet?


Gord


On Tue, 1 Sep 2009 12:37:01 -0700, S G Tan
wrote:

Could I trouble you again? Is it possible to produce that index and hyperlink
to the relevant tab?

"S G Tan" wrote:

thanks again - that worked.

"Gord Dibben" wrote:

Sub toc()
Dim i, c, r As Long
r = ActiveCell.Row - 1
c = ActiveCell.Column
For i = 1 To Sheets.Count
Cells(i + r, c).Value = Sheets(i).Name
Next i
End Sub


Gord Dibben MS Excel MVP

On Tue, 1 Sep 2009 05:45:01 -0700, S G Tan
wrote:

When I do that, it defaults to the top of the page and start the list. Is it
possible to change the macro,so that it list the start of the TOC at the cell
that I specify?

"Don Guillett" wrote:

sub toc()
for i=1 to sheets.count
cells(i,1).value=sheets(i).name
next i
end sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"S G Tan" wrote in message
...
I have 15 or more worksheet tabs. How do I make a list/auto-populate of all
the name of the tabs on one worksheet to form the basis of an index?





  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Worksheet Tab index

Just use a double click event instead on the name typed into the cell.
Right click sheet tabview codeinsert this

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Application.DisplayAlerts = False
Dim WantedSheet As String
WantedSheet = Trim(ActiveCell.Value)
If WantedSheet = "" Then Exit Sub
On Error Resume Next
If Sheets(WantedSheet) Is Nothing Then
'GetWorkbook ' calls another macro to do that
Else
Application.Goto Sheets(WantedSheet).Range("a4")
End If
Application.DisplayAlerts = True
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"S G Tan" wrote in message
...
Could I trouble you again? Is it possible to produce that index and
hyperlink
to the relevant tab?

"S G Tan" wrote:

thanks again - that worked.

"Gord Dibben" wrote:

Sub toc()
Dim i, c, r As Long
r = ActiveCell.Row - 1
c = ActiveCell.Column
For i = 1 To Sheets.Count
Cells(i + r, c).Value = Sheets(i).Name
Next i
End Sub


Gord Dibben MS Excel MVP

On Tue, 1 Sep 2009 05:45:01 -0700, S G Tan

wrote:

When I do that, it defaults to the top of the page and start the list.
Is it
possible to change the macro,so that it list the start of the TOC at
the cell
that I specify?

"Don Guillett" wrote:

sub toc()
for i=1 to sheets.count
cells(i,1).value=sheets(i).name
next i
end sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"S G Tan" wrote in message
...
I have 15 or more worksheet tabs. How do I make a
list/auto-populate of all
the name of the tabs on one worksheet to form the basis of an
index?







  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Worksheet Tab index

Worked like a treat -you guys are amazing. Many thanks

"Don Guillett" wrote:

Just use a double click event instead on the name typed into the cell.
Right click sheet tabview codeinsert this

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Application.DisplayAlerts = False
Dim WantedSheet As String
WantedSheet = Trim(ActiveCell.Value)
If WantedSheet = "" Then Exit Sub
On Error Resume Next
If Sheets(WantedSheet) Is Nothing Then
'GetWorkbook ' calls another macro to do that
Else
Application.Goto Sheets(WantedSheet).Range("a4")
End If
Application.DisplayAlerts = True
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"S G Tan" wrote in message
...
Could I trouble you again? Is it possible to produce that index and
hyperlink
to the relevant tab?

"S G Tan" wrote:

thanks again - that worked.

"Gord Dibben" wrote:

Sub toc()
Dim i, c, r As Long
r = ActiveCell.Row - 1
c = ActiveCell.Column
For i = 1 To Sheets.Count
Cells(i + r, c).Value = Sheets(i).Name
Next i
End Sub


Gord Dibben MS Excel MVP

On Tue, 1 Sep 2009 05:45:01 -0700, S G Tan

wrote:

When I do that, it defaults to the top of the page and start the list.
Is it
possible to change the macro,so that it list the start of the TOC at
the cell
that I specify?

"Don Guillett" wrote:

sub toc()
for i=1 to sheets.count
cells(i,1).value=sheets(i).name
next i
end sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"S G Tan" wrote in message
...
I have 15 or more worksheet tabs. How do I make a
list/auto-populate of all
the name of the tabs on one worksheet to form the basis of an
index?






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
Hyperlink worksheet data to a index in a workbook? tb Excel Worksheet Functions 1 July 6th 09 05:29 PM
index, match, offset worksheet function sand Excel Worksheet Functions 3 March 20th 08 10:02 PM
I have an index sheet of over 200 worksheet tabs... LdyWldKat Excel Discussion (Misc queries) 4 October 9th 06 10:24 PM
using index, match on another worksheet elrussell Excel Worksheet Functions 1 March 8th 06 06:25 AM
Creating and Index with worksheet names JackR Excel Discussion (Misc queries) 1 February 23rd 06 08:16 PM


All times are GMT +1. The time now is 01:38 PM.

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

About Us

"It's about Microsoft Excel"