Hello!
I have a workbook with 39 tabs that need to be saved individually as PDFs. To save myself time, I created a macro that does this. Code is below. Problem is, I can't get the PDFs to be saved/exported to a specific folder consistently. I've tried a few solutions I looked up online, but I must be doing something wrong. I tried "ChDir" followed by a path, but they always save to My Documents and I don't want them there. Can anyone provide a simple solution here?
I have a workbook with 39 tabs that need to be saved individually as PDFs. To save myself time, I created a macro that does this. Code is below. Problem is, I can't get the PDFs to be saved/exported to a specific folder consistently. I've tried a few solutions I looked up online, but I must be doing something wrong. I tried "ChDir" followed by a path, but they always save to My Documents and I don't want them there. Can anyone provide a simple solution here?
Code:
Sub Save_PDFs()
For n = 1 To 39
ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=ActiveSheet.Name, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=False, _
IgnorePrintAreas:=False, _
OpenAFterPublish:=False
ActiveSheet.Next.Select
Next n
End Sub