To Summarize the sheet with hyperlink

mayaa_mmm

Board Regular
Joined
Jul 30, 2014
Messages
54
Office Version
  1. 2010
Platform
  1. Windows
I need to summarize the sheet with sheet name as " Summary sheet" with hyperlink.

In the below code , it is summarize but file name is not proper and i need to do manually the hyperlink.

Private Sub ListSheets()
'list of sheet names starting at A1
Dim Rng As Range
Dim i As Integer
Worksheets.Add
Set Rng = Range("A1")
For Each Sheet In ActiveWorkbook.Sheets
Rng.Offset(i, 0).Value = Sheet.Name
i = i + 1
Next Sheet
End Sub


// linking the sheets


=HYPERLINK("#'"&A2&"'!A1",A2)

Thank you in advance
 
.
.

Try something like this:

Code:
Private Sub AddSummarySheet()
    
    Dim Sh As Worksheet
    Dim WS As Worksheet
    Dim Rw As Byte
    
    With Application
        .DisplayAlerts = False
        .ScreenUpdating = False
    End With
    
    On Error Resume Next
    ActiveWorkbook.Sheets("Summary Sheet").Delete
    On Error GoTo 0
    
    Set WS = ActiveWorkbook.Worksheets.Add(Before:=Sheets(1))
    WS.Name = "Summary Sheet"
    
    Rw = 1
    For Each Sh In ActiveWorkbook.Worksheets
        If Not Sh Is WS Then
            Sh.Hyperlinks.Add _
                Anchor:=WS.Cells(Rw, "A"), _
                Address:=vbNullString, _
                SubAddress:=Sh.Name & "!A1", _
                TextToDisplay:=Sh.Name
            Rw = Rw + 1
        End If
    Next Sh

    With Application
        .DisplayAlerts = True
        .ScreenUpdating = True
    End With

End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,226,840
Messages
6,193,283
Members
453,788
Latest member
drcharle

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