Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Using Excel 2007
Row 1 has a header of calendar dates. I apply a conditional formatting formula to shade weekend headers in yellow. Then I execute the following code to hide columns with shaded headers, but nothing happens. .. Sub HideShadedCols() Dim myRange As Range For i = 9 To 256 Set myRange = Cells(1, i) If myRange.Interior.ColorIndex < xlNone Then myRange.EntireColumn.Hidden = True End If Next End Sub .. However, for test purpose, if I color some headers cells the hard way and run my code, it hides the shaded columns properly. The question is, since the applied conditional formating is not recognized by VBA what intermediate statements do I have to insert ? Thank you for your help. J.P. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Shaded cells won't print shaded | Excel Worksheet Functions | |||
Toggle Command Button to Show/Hide the Shaded Headers Columns | Excel Programming | |||
Hiding matrix headers | Setting up and Configuration of Excel | |||
Hiding row and column headers, scroll bars | Excel Programming | |||
hiding the headers | Excel Programming |