Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / General Excel Questions / March 2008

Tip: Looking for answers? Try searching our database.

Code not working within hidden column range

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RobN - 24 Mar 2008 05:58 GMT
Using vs 2007, how can this be modified so that it will colour hidden
columns within the range?

If Target = "F" Then
   With Target.Offset(0, -ColNumber + 1).Resize(1, ColNumber + 15).Interior
       .ColorIndex = 5
       .Pattern = xlSolid
   End With
End If

Rob
Jarek Kujawa - 24 Mar 2008 10:54 GMT
Would this help?

If Target = "F" Then
With Target.Offset(0, -ColNumber + 1).Resize(1, ColNumber +
15).Select
   For Each cell In Selection
       If cell.Columns.Hidden Then
            cell.Columns.EntireColumn.Interior.ColorIndex = 5
       End If
   Next cell
End With
End If
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.