Shakti Bansal
Member
Hi,
I've below code written to print data in excel basis print area. I need assistance in amending the same, so that excel picks up print area as file name whenever I try to print it to PDF in excel.
Please assist.
>>> use code - tags <<<
I've below code written to print data in excel basis print area. I need assistance in amending the same, so that excel picks up print area as file name whenever I try to print it to PDF in excel.
Please assist.
>>> use code - tags <<<
Code:
Sub Print_PL_Summary()
With ActiveSheet.PageSetup
.FitToPagesWide = 1
.FitToPagesTall = 2
.FirstPageNumber = counter
.PrintArea = "print_summary"
End With
'<VBA_INSPECTOR>
' <CHANGE>
' <MESSAGE>Potentially contains changed items in the object model</MESSAGE>
' <ITEM>[xls]Sheets.PrintOut</ITEM>
' <URL>http://go.microsoft.com/fwlink/?LinkID=215357 </URL>
' </CHANGE>
'</VBA_INSPECTOR>
ActiveWindow.SelectedSheets.PrintOut Copies:=1
counter = counter + 2
End Sub
Last edited by a moderator: