1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
Sub Bouton3_Cliquer()
Dim sNomFichierPDF As String
Dim xRg As Range
Dim xCell As Range
Dim xRgVList As Range
Dim i As Long
Set xRg = Worksheets("TEST").Range("D1")
Set xRgVList = Evaluate(xRg.Validation.Formula1)
For Each xCell In xRgVList
xRg = xCell.Value
i = i + 1
sNomFichierPDF = ThisWorkbook.Path & "\" & Worksheets("TEST").Range("D1") & "_" & i & ".pdf"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:=sNomFichierPDF, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=False
Next xCell
End Sub |
Partager