Private Sub Button1_Click()
Dim Chemin$, Fiche$, NomFiche$
Dim SheetArray() As Variant
Dim I&, Indx&
Chemin = ThisWorkbook.Path & Application.PathSeparator
Fiche = "TEST.pdf"
Indx = 0
For I = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(I) Then
ReDim Preserve SheetArray(Indx)
SheetArray(Indx) = ListBox1.List(I)
Sheets(I + 1).Visible = 1
Indx = Indx + 1
End If
Next I
If Indx > 0 Then
Application.ScreenUpdating = False
Sheets(SheetArray()).Select
NomFiche = Chemin & Fiche
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:=NomFiche, _
Quality:=xlQualityMinimum, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=False
End If
Erase SheetArray
Feuil1.Select
For I = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(I) Then Sheets(I + 1).Visible = 2
Next I
Unload Me
Application.Goto [A1], True
End Sub