-1

I searched all over internet and could not find answer to my problem. Maybe you will have some smart solution. Here is the case:

  1. I would like to print pages to PDF, on each worksheet I have 11 print areas (Page 1 -> Page 11)
  2. Each worksheet has a column that determines if line (row) should be shown or not (shown by arrow on picture)
  3. On two worksheets after filtering I have only Page1, Page2, Page3 and Page10 to be printed.
  4. Standard ExportbyFixedFormat gives me blank pages that are hidden on final PDF so I have 11 pages PDF in structure: Page1, Page2, Page3 , 6 blank pages, page10 , page 11...

Here is the issue, I do not know why even though it is hidden it still is printed on PDF. I also tried PrintOut() but with no success.

Questions:

Is there a way to define Pages that I'd like to have printed in some option? Maybe there is a setup in Print menu that I am not aware of?

If anyone met similar problem and have a solution, I'd be very grateful, thank you!

J.image showing case

Jakub
  • 3
  • 1

1 Answers1

0

It is possible to select the pages to be printed in VBA. See EDIT#1 on this one for a good starting example. On the each sheet the printing area has to be selected. Excel VBA to Export Selected Sheets to PDF

Samuel
  • 2,923
  • 1
  • 4
  • 19