vbaamateur1
New Member
- Joined
- Dec 8, 2017
- Messages
- 3
I have a simple macro on an excel sheet where at the click of a button, it changes the page into a pdf.
Currently, the path is as such:
Sub savereport()
'
' savereport Macro
'
Sheets("Print Preview").Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\Users\E233761\Downloads\WeeklyReport.pdf", Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
True
End Sub
It works fine on my laptop but when I send it to a colleage it does not work, which makes sense because the path is trying to save it to my downloads. What path do I write to get it to save onto the downloads of whoever the user is?
Currently, the path is as such:
Sub savereport()
'
' savereport Macro
'
Sheets("Print Preview").Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\Users\E233761\Downloads\WeeklyReport.pdf", Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
True
End Sub
It works fine on my laptop but when I send it to a colleage it does not work, which makes sense because the path is trying to save it to my downloads. What path do I write to get it to save onto the downloads of whoever the user is?