Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
My code below works as long as it finds that tab color, but in the event
there are no tabs with this colorindex it crashes Excel completely. My tabs colors are assigned earlier in the process by criteria. It is looking for seasonal employees, which we will not have until March so when this part of the code runs it crashes. Is there an easy workaround? Sub Select1seasonal() Dim s() As String Dim ws As Worksheet Dim i As Integer i = 0 For Each ws In Worksheets If ws.Tab.ColorIndex = 37 Then ReDim Preserve s(i) s(i) = ws.Name i = i + 1 End If Next ws Worksheets(s).Select |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
In Excel it would help a lot to be able to sort rows by color | Excel Discussion (Misc queries) | |||
Excel sort by Fill Color by custom list sort | Excel Discussion (Misc queries) | |||
Is there a way to Sort data by color in Excel? | Excel Discussion (Misc queries) | |||
Font color crashes! | Excel Discussion (Misc queries) | |||
Excel 2000 VBA Sort without Select | Excel Programming |