Hello,
I have been looking around for a macro that will save an excel sheet as a PDF with the following requirements:
Named the same as the sheet
Add current date
select folder location
I have been messing around with the following code:
I cant get the the folder location to work in that code, what am I missing?
Thanks,
Bdenn
I have been looking around for a macro that will save an excel sheet as a PDF with the following requirements:
Named the same as the sheet
Add current date
select folder location
I have been messing around with the following code:
Code:
Sub Save_ActSht_as_Pdf()
' Saves active sheet as PDF file.
Dim Name As String
Name = ThisWorkbook.Path & "\" & ActiveSheet.Name & " " & _
Format(Now(), "mm-dd-yyyy") & ".pdf"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=Name, _
Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=False
End Sub
I cant get the the folder location to work in that code, what am I missing?
Thanks,
Bdenn