View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_5_] Dave Peterson[_5_] is offline
external usenet poster
 
Posts: 1,758
Default Conditional Format and VBA

Just to add to Ron's response.

It's usually lots easier to evauate the formula in the conditional formatting
dialog (well, if you know the formula).

But if you really want to get the conditional formatting color, you could use
some code from Chip Pearson's site--it's not for the faint of heart!

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



Sandy wrote:

I have certain cells set to colorindex = 6 using Conditional Formatting.

I am trying via vba to act on these cells when encountered. When I try to
return the color value such as

xColor = Range("A1").Interior.ColorIndex

I get an incorrect result.

How do I do this and is there a way to set conditional formats vis VBA.

Thanks,

Sandy


--

Dave Peterson