Hello,
try this, insert highlighted part after your quadruppel End if.
This will save to Desktop:
Dim strDesktopPath As String
Set WSHShell = CreateObject("wscript.Shell")
strDesktopPath = WSHShell.SpecialFolders.Item("Desktop")
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=strDesktopPath & "YourfileNameHere"
|