Dear VBA Specialists,
I've created a macro that can take a part of the sheet (A1:G33) and print it as a .pdf file (see code below)
All the information/details are filled in based on one cell (L16).
I got another sheet called "RL-Liste" which contains all the numbers that have to be filled in into L16.
Can someone help me to create a loop that runs the macro with L16 filled in with the input of A1 from sheet "RL-Liste" then A2, A3 etc... Untill it hits a blank and it has to stop.
Thanks in advance,
Edwin van der Mijl
I've created a macro that can take a part of the sheet (A1:G33) and print it as a .pdf file (see code below)
All the information/details are filled in based on one cell (L16).
I got another sheet called "RL-Liste" which contains all the numbers that have to be filled in into L16.
Can someone help me to create a loop that runs the macro with L16 filled in with the input of A1 from sheet "RL-Liste" then A2, A3 etc... Untill it hits a blank and it has to stop.
Thanks in advance,
Edwin van der Mijl
VBA Code:
Sub Button1_Click()
Dim DateiName As String
DateiName = Range("Q4") & Range("Q3") & ".pdf"
Range("A1:G33").ExportAsFixedFormat Type:=xlTypePDF, Filename:=DateiName, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=True
End Sub