Hi, I need to print multiple sheets from the same workbook to individual PDFs.
I need it to create a folder on the desktop if possible using cell A1 from the Master sheet which contains the date of payment.
For every sheet in the workbook I want it to save using Name of Sheet & Master!A1
I then want it to activate the Master sheet.
Everything I have tried so far just keeps giving me errors.
Sub ExportToPDFs()
Dim ws As Worksheet
For Each ws In Worksheets
ws.Select
nm = ws.Name
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:="C:\Users\xo-je\Documents\Fins\" & nm & ".pdf", _
Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=False
Next ws
Sheets("master").Activate
End Sub
I need it to create a folder on the desktop if possible using cell A1 from the Master sheet which contains the date of payment.
For every sheet in the workbook I want it to save using Name of Sheet & Master!A1
I then want it to activate the Master sheet.
Everything I have tried so far just keeps giving me errors.
Sub ExportToPDFs()
Dim ws As Worksheet
For Each ws In Worksheets
ws.Select
nm = ws.Name
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:="C:\Users\xo-je\Documents\Fins\" & nm & ".pdf", _
Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=False
Next ws
Sheets("master").Activate
End Sub