Hello,
I have the VBA code below. End goal is to have each tab in the workbook to be exported into its own PDF.
Problem: it works fine on my computer, but when someone else tries to use the macro on their own computer, it errors.
Sub ExportToPDFs()
' Save Each Worksheet to a separate PDF file.
Dim ws As Worksheet
For Each ws In Worksheets
ws.Select
nm = ws.Name
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:="C:\Users\xxxxxxx\Desktop\AD Directives for posting on FRI" & nm & ".pdf", _
Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=False
Next ws
End Sub
I have the VBA code below. End goal is to have each tab in the workbook to be exported into its own PDF.
Problem: it works fine on my computer, but when someone else tries to use the macro on their own computer, it errors.
Sub ExportToPDFs()
' Save Each Worksheet to a separate PDF file.
Dim ws As Worksheet
For Each ws In Worksheets
ws.Select
nm = ws.Name
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:="C:\Users\xxxxxxx\Desktop\AD Directives for posting on FRI" & nm & ".pdf", _
Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=False
Next ws
End Sub