Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Is it possible to print only those tabs of a particular colour - say yellow?
Saintsman |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Try this:-
Sub selectiveprint() Dim wSheet As Worksheet For Each wSheet In Worksheets wSheet.Select If ActiveSheet.Tab.ColorIndex = 6 Then wSheet.PrintOut End If Next wSheet End Sub Mike "Saintsman" wrote: Is it possible to print only those tabs of a particular colour - say yellow? Saintsman |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks - all I need to do is group the sheets for page numbering & I'm there
"Mike H" wrote: Try this:- Sub selectiveprint() Dim wSheet As Worksheet For Each wSheet In Worksheets wSheet.Select If ActiveSheet.Tab.ColorIndex = 6 Then wSheet.PrintOut End If Next wSheet End Sub Mike "Saintsman" wrote: Is it possible to print only those tabs of a particular colour - say yellow? Saintsman |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Try this, I think you'll find it does the job for you. It does leave the
sheets with chosen color selected as a group. Sub GroupSheetsByColorAndPrint() 'change ProperColor to color code you need '13 is 'standard' yellow in Excel 2007 '6 is Yellow in earlier versions ' 'the array SheetsGroup() will always have 'an empty element as the last element, 'this code takes that into account ' Const ProperColor = 6 Dim SheetsGroup() As String Dim WS As Worksheet ReDim SheetsGroup(1 To 1) For Each WS In Worksheets If WS.Tab.ColorIndex = ProperColor Then SheetsGroup(UBound(SheetsGroup)) = WS.Name ReDim Preserve SheetsGroup(1 To UBound(SheetsGroup) + 1) End If Next If UBound(SheetsGroup) 1 Then ReDim Preserve SheetsGroup(1 To UBound(SheetsGroup) - 1) Sheets(SheetsGroup).Select ActiveWindow.SelectedSheets.PrintOut Copies:=1 End If End Sub "Saintsman" wrote: Thanks - all I need to do is group the sheets for page numbering & I'm there "Mike H" wrote: Try this:- Sub selectiveprint() Dim wSheet As Worksheet For Each wSheet In Worksheets wSheet.Select If ActiveSheet.Tab.ColorIndex = 6 Then wSheet.PrintOut End If Next wSheet End Sub Mike "Saintsman" wrote: Is it possible to print only those tabs of a particular colour - say yellow? Saintsman |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Condition depending on tab colour | Excel Worksheet Functions | |||
colour of a row depending on cell value | Excel Discussion (Misc queries) | |||
Can I filter a row depending on the colour that I've highlighted it with? | Excel Discussion (Misc queries) | |||
Background Colour Depending On Input | Excel Discussion (Misc queries) | |||
Changing Colour of Bar depending on Value | Charts and Charting in Excel |