Bonjour
Je propose de créer une nouvelle feuille pour y lister toutes les feuilles
Puis, on remplira la listbox en une ligne
Listbox1.List = Range(listsheets()).Value
Ou
Listbox1.list = Range(CreateIndexSheet)
A tester et à corriger au besoin
Function listsheets()
Dim i as integer
Activeworkbook.worksheets.Add
ActiveSheet.name = "index"
for i=1 to worksheets.Count
If Worksheets(i).name<> "index" then Worksheets("index").Range("A" & cstr(i)) = worksheets(i).name
Next
Listsheets = "index!A1:A" & cstr(worksheets.count -1)
End functionFunction CreateIndexSheet()
Dim wSheet As Worksheet
ActiveWorkbook.Sheets.Add(Before:=Worksheets(1)).Name = "index"
Range("A1").Select
Application.ScreenUpdating = False
For Each wSheet In Worksheets
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:="'" & wSheet.Name & "'" & "!A1", TextToDisplay:=wSheet.Name
ActiveCell.Offset(1, 0).Select
Next
Range("A1").EntireColumn.AutoFit
Range("A1").EntireRow.Delete
Application.ScreenUpdating = True
CreateIndexSheet = "index!A1:A" & Cstr(ActiveSheet.Sheets(ActiveSheets.rows.count,1).End(xlUp).Row)
End Function
Dans la feuille 'index' ajouter ceci
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
If Not (Application.Intersect(Range("A1"), Target) Is Nothing) Then _
ThisWorkbook.Sheets(Target.Value).Activate
End Sub
On peut ainsi depuis la feuille Index atteindre n'importe quelle feuille du classeur