I am using Excel 2013.
I'm close to achieving the result I want but I need some help. Please, before it drives me insane. Lol. I have made a Purchase Order Sheet that auto-fills a lot of information based on the vendor chosen in a drop-down list in cell 'C10'. It also has the current date in cell 'H5' (pic below). What I would like to happen is the document save as a PDF in the folder Q:\Michael\PO's\2018 with the name of the vendor chosen in 'C10' followed by an underscore '_' then the date from cell 'H5' in mm-dd-yyyy format like this - Arizona Forklift Parts_05-04-2018.pdf
I know the way it is now is wrong so if I could get some assistance I would appreciated it. There may be some extra code in there I don't need as well because I have been trying to piece together and figure it out for quite awhile now.
Thanks in advance,
Michael
I'm close to achieving the result I want but I need some help. Please, before it drives me insane. Lol. I have made a Purchase Order Sheet that auto-fills a lot of information based on the vendor chosen in a drop-down list in cell 'C10'. It also has the current date in cell 'H5' (pic below). What I would like to happen is the document save as a PDF in the folder Q:\Michael\PO's\2018 with the name of the vendor chosen in 'C10' followed by an underscore '_' then the date from cell 'H5' in mm-dd-yyyy format like this - Arizona Forklift Parts_05-04-2018.pdf
I know the way it is now is wrong so if I could get some assistance I would appreciated it. There may be some extra code in there I don't need as well because I have been trying to piece together and figure it out for quite awhile now.
Code:
Sub vendorPDF()
'
' vendorPDF Macro
'
'
Dim strFilename As String
Dim strpath As String
Application.DisplayAlerts = False
ActiveSheet.Unprotect Password = ""
Application.Goto Reference:="Print_Area_Vendor"
Selection.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
[COLOR=#ff0000]"Q:\Michael\PO's\2018\Range("C10")"_vendor.pdf"[/COLOR], Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, From:=1, To:=1, _
OpenAfterPublish:=True
Range("C14:E14").Select
ActiveSheet.Protect
End Sub
Thanks in advance,
Michael