Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
select sheets for printing
Can anyone tell me how to select sheets in a workbook based on a cell value
for printing? I have many sheets, I want to select all the sheets that have a value greater than 0 in C2 for printing, which I guess will then go something like: ActiveWindow.SelectedSheets.PrintOut Thanks in advance for help Benny |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
select sheets for printing
bennyob, try this,
Sub Print_sheets() 'will print sheet with a vavle 0 in C2 For Each Sheet In ThisWorkbook.Worksheets Sheet.Activate If Range("C2").Value 0 Then 'use this to test and comment out below ActiveSheet.PrintPreview 'use this to print 'ActiveSheet.PrintOut Copies:=1, Collate:=False End If Next End Sub -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "bennyob" wrote in message ... Can anyone tell me how to select sheets in a workbook based on a cell value for printing? I have many sheets, I want to select all the sheets that have a value greater than 0 in C2 for printing, which I guess will then go something like: ActiveWindow.SelectedSheets.PrintOut Thanks in advance for help Benny |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Autofilter Lists across Multiple Sheets, Maintain Correct Referenc | Excel Worksheet Functions | |||
enhanced conditional formatting | Excel Discussion (Misc queries) | |||
In 3 active sheets in wkbk, determine& display the # of sheets that have data | Excel Discussion (Misc queries) | |||
Finding specific sheets within a workbook | Excel Discussion (Misc queries) | |||
Spellnumber | Excel Worksheet Functions |