WindsorKnot
Board Regular
- Joined
- Jan 4, 2009
- Messages
- 160
Hi everyone,
I'm trying to figure this out. I need to print a workbook out (about 60 sheets 10 to 15 which shouldn't be printed out) based on whether the sheet contains the name _exhibit. I have a hunch that the workbook should contain an If statement and an array but I'm not sure how to code it properly.
This is what I have so far. To make things simpler, I only copied the first 6 sheets into the formula.
Any input would be great!
I'm trying to figure this out. I need to print a workbook out (about 60 sheets 10 to 15 which shouldn't be printed out) based on whether the sheet contains the name _exhibit. I have a hunch that the workbook should contain an If statement and an array but I'm not sure how to code it properly.
This is what I have so far. To make things simpler, I only copied the first 6 sheets into the formula.
Code:
Sub Print_Exhibit()
Dim Shts
Shts = Array("Sheet1_Exhibit", "Sheet2_Exhibit", "Sheet3", "Sheet4_Exhibit", "Sheet5", "Sheet6_Exhibit")
Dim Shts_E
Shts_E = Filter(Shts, "_Exhibit", True, vbTextCompare)
Dim WS As worksheet
If Wks = "_Exhibit" then Wks.printout
Next wks
End Sub