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: 29
Default .interior.color hates me

G'day there One & All,

Back once againg with something not working as I thought.

I have a list that I'm filtering by heading. I'm using the
Worksheet_SelectionChange event to check for the target cell, and then
filter by that criteria. Some of these criteria have a second sort
field, and what I'm trying to do is to alter the heading format to
indicate what's what.

Headings have black text and a light blue background. I want to
alter the format so that the main criteria is bold red text on a pink
back background, with the second sort criteria having the same colors,
but not bold.

The sort is working OK, and the font color is changing to red and
black as I click various cells, but the background color and the bold
property do nothing. No error is thrown, but the code just doesn't do
anything.

Here's what I have:

---[ CODE ] ---

Do some housekeeping,
turn screen updating off,
unprotect sheet,
and then:

This next bit sets base formatting for the header row and appears to
work OK.

With fltrCriteria.Cells
.Interior.Color = 16764057 ' LightBlue
.Font.Color = 0 ' Black
.Font.Bold = False
End With

# ("fltrCriteria" is a named range defining all header cells)

afterwards use the "target" from the sheet event:

Select Case target.Column
Case Is = 2 ' Station
' target.Activate

# (target.activate, and target.select have no effect)

With target.Cells
.Font.Color = 128 ' DarkRed
.Interior.Color = 8421631 ' Pink
.Font.Bold = True
End With
Set tmpCrit = fltrCriteria.Find(Work.Range("F12").Text)

# (determine secondary sort criteria)

With tmpCrit
.Font.Color = 128 ' DarkRed
.Interior.Color = 8421631 ' Pink
.Font.Bold = False
End With

srtShiftList obj_MAINFILTER:=target, obj_SECONDFILTER:=tmpCrit

# (srtShiftList is the sort routine in a standard module - if the
# optional obj_SECONDFILTER is not present then it sorts on a single
# criteria, and only one heading will be coloured red)

I've stepped through the code line by line, there are no errors,
the font.color seems to work OK, but everything else does nothing.
Google led to 3 or 4 different scenarios, but nothing that resolved the
issue. Does anyone have any ideas?

Thanks for listening.

--
See ya,
Ken McLennan
Qld, Australia
 
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
interior color of macro violet Excel Programming 2 September 7th 06 05:28 AM
Cell background color (interior color) setting not working Martin E. Excel Programming 1 May 21st 06 07:00 PM
Interior color Paal Excel Programming 1 March 20th 06 03:38 PM
Interior color Paal Excel Programming 0 March 20th 06 02:51 PM
Passing Back Color to Interior Color ExcelMonkey[_190_] Excel Programming 1 March 22nd 05 04:27 PM


All times are GMT +1. The time now is 03:07 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"