quick_question
New Member
- Joined
- May 31, 2011
- Messages
- 32
I'm trying to export my active sheet as a pdf while defining the name of the file and path as it will change each time this workbook is opened, but I continue to run into an Compile error / syntax error and can't seem to figure out where I'm going wrong -
Any help is appreciated!!
Sub SavePDF()
Dim FilePath As String
Dim DocName As String
FilePath = Sheets("PO").Range("U11").Value & ""
DocName = Sheets("PO").Range("U12").Value & ".pdf"
Worksheets("PO").Activate
ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
FileName:= FilePath & "" DocName & .pdf", _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=False
End Sub
Any help is appreciated!!
Sub SavePDF()
Dim FilePath As String
Dim DocName As String
FilePath = Sheets("PO").Range("U11").Value & ""
DocName = Sheets("PO").Range("U12").Value & ".pdf"
Worksheets("PO").Activate
ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
FileName:= FilePath & "" DocName & .pdf", _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=False
End Sub