![]() |
Selecting an array of worksheets for printing
I have a workbook with a number of worksheets to be printed. Which ones and
how many are determined by a series of BOOLEAN. I select the needed worksheets for printing. In this instance, BOOLBAseIllusWL = TRUE, BOOLShowAlternate = TRUE and BOOLAltIllusWL = TRUE. It picks the correct array of sheets as: Sheets(Array("Cover Sheet", "Interest Rate 1", "Interest Rate 2", "Non-financed", "AlternateIllustration", "Disclosure WL")).Select Then I want to print only the active sheets - the ones selected above. What I get is it prints darn near everything split into 4 separate printouts. What am I doing wrong? Code currently is: If BoolBaseIllusWL Then If BoolShowAlternate Then If BoolAltIllusWL Then 'alternative is also a WL Sheets(Array("Cover Sheet", "Interest Rate 1", "Interest Rate 2", "Non-financed", "AlternateIllustration", "Disclosure WL")).Select Else 'BoolAltIllusUL and show alternate illustration of UL product class Sheets(Array("Cover Sheet", "Interest Rate 1", "Interest Rate 2", "Non-financed", "AlternateIllustration", "Disclosure WL", "Disclosure UL")).Select End If Else 'no alternate illustration and only one product class Sheets(Array("Cover Sheet", "Interest Rate 1", "Interest Rate 2", "Non-financed", "Disclosure WL")).Select End If ActiveWorkbook.PrintOut Copies:=1, Collate:=True End If |
All times are GMT +1. The time now is 03:00 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com