Thread: ToC for sheets?
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default ToC for sheets?

Use this sub to make your list

Sub listsheets()
For i = 1 To Sheets.Count
Cells(i, 1) = Sheets(i).Name
Next i
End Sub

Put this sub into the SHEET module of the sheet with the list. Then double
click on the cell with the sheet name

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(ActiveCell.Value) Is Nothing Then
'GetWorkbook ' calls another macro to do that
Else
Application.Goto Sheets(ActiveCell.Value).Range("a4")
End If
Application.DisplayAlerts = True
End Sub

--
Don Guillett
SalesAid Software

"Zilla" wrote in message
...
Is there a "Table of Contents" function for sheets, so
if I have Sheet1 cells with the names of the other sheets,
I click on the sheet name and it goes to that shteet?

--
- Zilla
(Remove XSPAM)