Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
ron ron is offline
external usenet poster
 
Posts: 20
Default Sensing actual format background color

I have a cell with a conditional format that changes the background color as a function of a dynamic variable ( and < tests)

I'm trying to write a macro that branches based on the "actual" color of the cell - which is determined by whether the conditional format has been "keyed" or not

I've learned that
Selection.Intererior.ColorIndex an
Selection.FormatConditions(1/2/3).Interior.ColorInde
return the baseline and conditionally assigned color values but they don't tell me which color index value is in effect for the selected cell at the time

Is there a command that can return the color index that is in effect (either baseline or condition1/2/3)

Thank

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Sensing actual format background color

Do you mean something like this:

Debug.Print [A1].Interior.ColorIndex

-----Original Message-----
I have a cell with a conditional format that changes the

background color as a function of a dynamic variable (
and < tests).

I'm trying to write a macro that branches based on

the "actual" color of the cell - which is determined by
whether the conditional format has been "keyed" or not.

I've learned that
Selection.Intererior.ColorIndex and
Selection.FormatConditions(1/2/3).Interior.ColorIndex
return the baseline and conditionally assigned color

values but they don't tell me which color index value is
in effect for the selected cell at the time.

Is there a command that can return the color index that

is in effect (either baseline or condition1/2/3)?

Thanks

.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Sensing actual format background color

Ron

Chip Pearson has info and code for determining CF colors.

http://www.cpearson.com/excel/CFColors.htm

Gord Dibben Excel MVP

On Thu, 29 Apr 2004 16:06:03 -0700, Ron
wrote:

I have a cell with a conditional format that changes the background color as a function of a dynamic variable ( and < tests).

I'm trying to write a macro that branches based on the "actual" color of the cell - which is determined by whether the conditional format has been "keyed" or not.

I've learned that
Selection.Intererior.ColorIndex and
Selection.FormatConditions(1/2/3).Interior.ColorIndex
return the baseline and conditionally assigned color values but they don't tell me which color index value is in effect for the selected cell at the time.

Is there a command that can return the color index that is in effect (either baseline or condition1/2/3)?

Thanks


  #4   Report Post  
Posted to microsoft.public.excel.programming
e e is offline
external usenet poster
 
Posts: 1
Default Sensing actual format background color

Thanks Guys. There are some really intelligent folks on this board! Wish I
were one of them.

Ron


Reply
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
Checkbox to change background color, font color and remove/ add bo Sara Excel Discussion (Misc queries) 2 May 1st 23 11:43 AM
how can I conditionally change font color, or background color? MOHA Excel Worksheet Functions 3 August 21st 06 06:57 PM
how to count cells with specific format (background color)? Blackheartedowl Excel Discussion (Misc queries) 1 February 8th 06 08:21 AM
Format Background Color Teaser nastech Excel Discussion (Misc queries) 0 November 1st 05 08:51 PM
Default Border, Font Color, and Cell Background Color Elijah Excel Discussion (Misc queries) 1 October 28th 05 04:10 PM


All times are GMT +1. The time now is 06:03 AM.

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"