Private Sub Worksheet_Activate()
Dim Ws As Worksheet, Ongl As String, i As Integer
Range("B5").CurrentRegion.ClearContents
Range("B5").Select
For i = 3 To Sheets.Count
Ongl = Sheets(i).Name
If Sheets(i).Visible = xlSheetVisible Then
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:="'" & Ongl & "'" & "!A1", TextToDisplay:=Ongl
ActiveCell.Offset(0, 1).Value = i - 1
ActiveCell.Offset(1, 0).Select
End If
Next
End Sub