Sub Sommaire()
Dim NbFeuilles As Long
Dim NmFeuille As String
Dim Cpt As Long
Dim ExtraitNom As String
Dim NmLien As String
NbFeuilles = Worksheets.Count
Application.ScreenUpdating = False
Range("G1").Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Selection.ClearContents
ReDim tab_1(NbFeuilles - 7)
For Cpt = 7 To NbFeuilles
ExtraitNom = Sheets(Cpt).Name
tab_1(Cpt - 7) = ExtraitNom
Next Cpt
'On trie le tableau
For i = LBound(tab_1) To UBound(tab_1)
lemin = i
For y = i To UBound(tab_1)
If tab_1(y) < tab_1(lemin) Then
lemin = y
End If
Next y
zut = tab_1(lemin)
tab_1(lemin) = tab_1(i)
tab_1(i) = zut
Next i
'on remet le tableau dans les cases
col = 6
ligne = 1
Sheets("menu").Select
For i = LBound(tab_1) To UBound(tab_1)
If i Mod 30 = 0 Then
col = col + 1
ligne = 1
End If
Cells(ligne, col) = tab_1(i)
NmLien = "'" & tab_1(i) & "'!A1"
NmFeuille = tab_1(i)
ActiveSheet.Hyperlinks.Add Anchor:=Range(Cells(ligne, col), Cells(ligne, col)), Address:="", SubAddress:=NmLien, _
TextToDisplay:=NmFeuille
ligne = ligne + 1
Next i
Application.ScreenUpdating = True
Range("A1").Select
End Sub