Private Sub CommandButton9_Click()
Dim fichier$, r As Range, o As Object, x$
fichier = ThisWorkbook.Path & "\Etude Technique.pdf"
For Each r In [C3:O51,C53:O101,C103:O151,C153:O201].Areas
For Each o In Me.DrawingObjects
If Not Intersect(o.TopLeftCell, r) Is Nothing Then x = x & "," & r.Address: Exit For
Next o, r
If x = "" And Dir(fichier) <> "" Then Kill fichier 'RAZ
If x = "" Then Exit Sub
With Me.PageSetup
.Orientation = xlLandscape
.PrintTitleRows = ""
.PrintArea = Mid(x, 2)
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
Me.ExportAsFixedFormat xlTypePDF, fichier
UserForm6.Show
End Sub