I can't seem to get this code right.
I want to save a print area in the active worksheet as a PDF. It needs to be saved in the current active directory (where the workbook is stored) and named according to the value in Cell C19 of the active worksheet.
I've tried the following code and I'm not getting close:
Sub Printascellvalue()
'
'
Sheets("ltrbuild").Select
ActiveSheet.Range("$y$1:$y$198").AutoFilter Field:=1, Criteria1:="="
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"ActiveWorkbook.Path\" & Range("c19").Value, Quality:=xlQualityStandard, IncludeDocProperties:= _
True, IgnorePrintAreas:=False, OpenAfterPublish:=False
End Sub
Any ideas?
Bookmarks