Sub sommaireDynamique()
Dim feuille As Worksheet
Dim bouton As Shape
Dim positionY As Integer
For Each bouton In ActiveSheet.Shapes
If bouton.Name Like "menu_*" Then
bouton.Delete
End If
Next
positionY = 4
For Each feuille In Worksheets
Set bouton = ActiveSheet.Shapes.AddTextbox(msoTextOrientationHorizontal, 4, positionY, [a1].Width - 8, 30)
bouton.TextFrame2.TextRange.Characters.Text = feuille.Name
If feuille.Name = ActiveSheet.Name Then
bouton.ShapeStyle = msoShapeStylePreset14
Else
bouton.ShapeStyle = msoShapeStylePreset13
End If
If bouton.TextFrame2.TextRange.Characters.Text = "Menu" Then bouton.OLEFormat.Object.Interior.Color = 255
feuille.Hyperlinks.Add Anchor:=bouton, Address:="", SubAddress:="'" & feuille.Name & "'!A1"
bouton.Name = "menu_" & feuille.Name
positionY = positionY + 30
Next
End Sub