Hi,
I'm using a VBA to turn a sheet into a PDF and save it into the existing workbook location. The code I'm using below works however, I now need the PDFs to be saved in their own folder of the same name as the PDF. Where do I add this into my code
Sub save_excel_as_PDF()
With ActiveSheet.PageSetup
.Orientation = xlPortrait
.PrintArea = "$A$1:$F$33"
.Zoom = False
.FitToPagesTall = False
.FitToPagesWide = 1
End With
ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=ActiveWorkbook.Path & "\" & ActiveSheet.Range("B19").Value, _
Quality:=xlQualityStandard, _
IgnorePrintAreas:=False, _
From:=1, _
To:=2, _
OpenAfterPublish:=True _
End Sub
I'm using a VBA to turn a sheet into a PDF and save it into the existing workbook location. The code I'm using below works however, I now need the PDFs to be saved in their own folder of the same name as the PDF. Where do I add this into my code
Sub save_excel_as_PDF()
With ActiveSheet.PageSetup
.Orientation = xlPortrait
.PrintArea = "$A$1:$F$33"
.Zoom = False
.FitToPagesTall = False
.FitToPagesWide = 1
End With
ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=ActiveWorkbook.Path & "\" & ActiveSheet.Range("B19").Value, _
Quality:=xlQualityStandard, _
IgnorePrintAreas:=False, _
From:=1, _
To:=2, _
OpenAfterPublish:=True _
End Sub