Thread
:
Worksheet Tab index
View Single Post
#
10
Posted to microsoft.public.excel.misc
Don Guillett
external usenet poster
Posts: 10,124
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?
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett