Index Worksheets

Denise

New Member
Joined
Feb 19, 2002
Messages
18
I'm trying to keep better documentation on some very large workbooks.

As part of this I'd like to create a template that includes a worksheet that lists every other worksheet in the workbook, or a macro that creates a new worksheet and lists every other worksheet in the workbook.

Is this possible?

Hope that made sense, and thanks for any help.

Denise
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
EXCELLENT!!...Helped me w/ the Index thing AND how to correctly enter a code...been fighting with that for so long! THANKS!
 
Upvote 0
"SubAddress:="Index", TextToDisplay:="Back to Index"

How do I change this part of the code so that it doesn't change my text in A1 to "Back to Index". I like the hyperlink back to the index page, but I want my A1 cell text to remain what I have in there and be changed. I've tried but can't seem to get it.
 
Upvote 0
Hello

Try this, note however that if cell A1 on any sheet is left blank, "Hyperlinks.Add" will automatically add "Index" as the friendly name.

Code:
Private Sub Worksheet_Activate()
Dim wSheet As Worksheet
Dim l As Long
l = 1
    With Me
        .Columns(1).ClearContents
        .Cells(1, 1) = "INDEX"
        .Cells(1, 1).Name = "Index"
    End With
    For Each wSheet In Worksheets
        If wSheet.Name <> Me.Name Then
            l = l + 1
                With wSheet
                    .Range("A1").Name = "Start_" & wSheet.Index
                    .Hyperlinks.Add Anchor:=.Range("A1"), Address:="", _
                    SubAddress:="Index", TextToDisplay:=.Range("A1").Text
                End With
                Me.Hyperlinks.Add Anchor:=Me.Cells(l, 1), Address:="", _
                SubAddress:="Start_" & wSheet.Index, TextToDisplay:=wSheet.Name
        End If
    Next wSheet
End Sub
 
Upvote 0
Hello weaselmcguff,

Thank you for your PM. I have chosen to reply through the message board so that the answer, if it is of any value, is available to all. :)

weaselmcguff said:
Hi,

I saw your post on Mrexcel and had a question on it.

http://www.mrexcel.com/forum/showthread.php?24957-Index-Worksheets


the last comment where you set it up and creates and Index sheet of all the work sheets in the work book. Is there a way to apply a description to these sheets that it pulls?

What I want to do is take the listing of the sheets which it places in column A and then in Column B it apply the description to that sheet. Is this possible? Each sheet has difffernt description and sheets are constantly added and deleted. The orginal version of creating and hyperlinking to them works great. Just like to be able to have a description to what each is.

Thanks for your time

Try this, type a description into cell B1, on each sheet you wish to index, or to use another cell just change the reference below.


Code:
Private Sub Worksheet_Activate()
Dim wSheet As Worksheet
Dim l As Long
l = 1
    With Me
        .Columns(1).ClearContents
        .Cells(1, 1) = "INDEX"
        .Cells(1, 1).Name = "Index"
    End With
    For Each wSheet In Worksheets
        If wSheet.Name <> Me.Name Then
            l = l + 1
                With wSheet
                    .Range("A1").Name = "Start_" & wSheet.Index
                    .Hyperlinks.Add Anchor:=.Range("A1"), Address:="", _
                    SubAddress:="Index", TextToDisplay:=.Range("A1").Text
                End With
                Me.Hyperlinks.Add Anchor:=Me.Cells(l, 1), Address:="", _
                SubAddress:="Start_" & wSheet.Index, TextToDisplay:=wSheet.Name
                Me.Cells(l, 2) = wSheet.Range("[COLOR="#FF0000"]B1[/COLOR]")
        End If
    Next wSheet
End Sub
 
Upvote 0
Brian

I have found this thread which is unusual in that it includes the ability to have a description on each sheet which is wonderful.

Would it be possible to include in column C the Internal Sheet Name and in column D the worksheet Index Number.

I think that with these extra fields we would have virtually all sheet info in one place.

My grateful thanks for any help that you can provide.
 
Upvote 0

Forum statistics

Threads
1,215,062
Messages
6,122,923
Members
449,094
Latest member
teemeren

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top