To save and print a worksheet as a PDF in Excel VBA, you can use the ExportAsFixedFormat
End Sub
'Export the range rng.ExportAsFixedFormat Type:=xlTypePDF, _ Filename:=FilePath, _ Quality:=xlQualityStandard excel vba print to pdf and save
Hardcoding filenames ( MyReport.pdf ) means old files get overwritten. Instead, use VBA to create unique names using timestamps. To save and print a worksheet as a
'Export that specific sheet ws.ExportAsFixedFormat Type:=xlTypePDF, _ Filename:=FilePath, _ Quality:=xlQualityStandard excel vba print to pdf and save