Matkan1992
New Member
- Joined
- Jun 28, 2017
- Messages
- 1
Hi
I'm a real rookie in the VBA world, so I hope you will bear with me.
I've been working on a workbook, where the finishing touch is, that it generates a PDF with the final results. This means combining ranges from different sheets.
So far I've manage to create an VBA code which creates pdf's but it does a separate pdf for each sheet.
Can anyone help me adjust my code, so it saves only one combined pdf?
My code so far:
Sub ExporterPDF1()
Sheet1.Range("B1:K27").ExportAsFixedFormat xlTypePDF, Environ("UserProfile") & "\Desktop\TEST.PDF"
Sheet7.Range("A4:J37").ExportAsFixedFormat xlTypePDF, Environ("UserProfile") & "\Desktop\TEST1.PDF"
Sheet3.Range("A1:H24").ExportAsFixedFormat xlTypePDF, Environ("UserProfile") & "\Desktop\TEST2.PDF"
End Sub
I'm a real rookie in the VBA world, so I hope you will bear with me.
I've been working on a workbook, where the finishing touch is, that it generates a PDF with the final results. This means combining ranges from different sheets.
So far I've manage to create an VBA code which creates pdf's but it does a separate pdf for each sheet.
Can anyone help me adjust my code, so it saves only one combined pdf?
My code so far:
Sub ExporterPDF1()
Sheet1.Range("B1:K27").ExportAsFixedFormat xlTypePDF, Environ("UserProfile") & "\Desktop\TEST.PDF"
Sheet7.Range("A4:J37").ExportAsFixedFormat xlTypePDF, Environ("UserProfile") & "\Desktop\TEST1.PDF"
Sheet3.Range("A1:H24").ExportAsFixedFormat xlTypePDF, Environ("UserProfile") & "\Desktop\TEST2.PDF"
End Sub