Hello,
I have the following script to print multiple worksheets to PDF:
However, I am only getting one worksheet page in the PDF file.Please Login or Register to view this content.
Could you please advise, what is wrong here?
Thanks
Hello,
I have the following script to print multiple worksheets to PDF:
However, I am only getting one worksheet page in the PDF file.Please Login or Register to view this content.
Could you please advise, what is wrong here?
Thanks
if your array is working then
ActiveSheet.ExportAsFixedFormat
change to
ActiveWorkbook.ExportAsFixedFormat
If you are satisfied with the solution(s) provided, please mark your thread as Solved.
Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.
You should use Debug.Print worksheetstoprint to make sure that you setup the array correctly.
The 2nd sub shows another selection method. Add Worksheets(indexnumber) rather than Worksheets(worksheetname) in an index loop like you did.
Please Login or Register to view this content.
Last edited by Kenneth Hobson; 05-24-2016 at 09:08 PM.
see the ....hide sheet you don't want to print, then unhide everything at the end methodPlease Login or Register to view this content.
Last edited by humdingaling; 05-24-2016 at 09:11 PM. Reason: updated code
This is the way I do it.
Change all references as required.
Please Login or Register to view this content.
humdingaling,
Nice! "Hiding" and "Unhiding" the sheets did the trick, simple, and ingenious.
Thanks a lot!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks