LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default Hiding columns with shaded headers

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Shaded cells won't print shaded Linda C Excel Worksheet Functions 4 April 3rd 23 06:59 PM
Toggle Command Button to Show/Hide the Shaded Headers Columns u473 Excel Programming 1 April 21st 08 07:27 PM
Hiding matrix headers Cliff McD Setting up and Configuration of Excel 1 June 7th 07 10:56 AM
Hiding row and column headers, scroll bars Anna B Excel Programming 2 March 1st 06 04:48 PM
hiding the headers Wilbo Excel Programming 1 June 18th 04 10:49 PM


All times are GMT +1. The time now is 08:51 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"