Sub FusionPDF()
Dim Ar() As Variant, j As Long
Dim Wsh As Worksheet, sFichier As String, sNom As String
Application.ScreenUpdating = False
For Each Wsh In ThisWorkbook.Worksheets
If Wsh.Visible And FeuilleVide(Wsh.Name) = False Then
ReDim Preserve Ar(j)
Ar(j) = Wsh.Name
j = j + 1
End If
Next Wsh
ThisWorkbook.Sheets(Ar).Select
sNom = ThisWorkbook.Path & "\" & "Fusion.pdf"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=sNom, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=False
ThisWorkbook.Sheets(1).Select
Erase Ar
Application.ScreenUpdating = True
End Sub
Private Function FeuilleVide(sNomFeuille As String) As Boolean
FeuilleVide = False
If WorksheetFunction.CountA(Worksheets(sNomFeuille).UsedRange) = 0 And _
Worksheets(sNomFeuille).Shapes.Count = 0 Then
FeuilleVide = True
End If
End Function