ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Creating an array of sheets to print (https://www.excelbanter.com/excel-programming/338182-creating-array-sheets-print.html)

Luc Dansereau[_3_]

Creating an array of sheets to print
 
Hi,

Can someone help me with this:

In VB, I want to select multiple sheets (but not all, and not allways the
same) based on certain criterias. Once this will be done, I will be able
using "ActiveWindow.SelectedSheets.PrintPreview" to print (or preview) those
selected sheets.

Thanks for your help

Luc Dansereau



mike

Creating an array of sheets to print
 
If the criteria is manually applied, consider adding a form to your
workbook. For each sheet, add a checkbox as a print control.

If programmatically, record the worksheet name (or number) in an array
(or a string) if the criteria is met. Then Select them using something
like the following:

Sheets(Array("Sheet1", "Sheet3")).Select

Finally. process the array for printing.



All times are GMT +1. The time now is 01:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com