View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Michael Michael is offline
external usenet poster
 
Posts: 791
Default Conditional Formatting

I found this great function in
her:http://www.vbaexpress.com/kb/getarticle.php?kb_id=190
It returns the conditional formatting Index color of a cell, however, this
works only if I insert it in a cell, I want to be able to use it inside a
code. What do I have to do?

I basically want to do this:
I want to have the same cell color as the one that has the Conditional
Format set.

For Each TrfcCol In TrfcCol
Trfccol.Interior.ColorIndex=Trfccol.Offset(1,0).In terior.ColorIndex

Next

This is not working and that is why I wanted to return the interior color of
the cell next to the one I want colored.
So I tried this:

Mycolorcell=Trfccol.Offset(1,0).address

FndIndex= ConditionalColor(MyColorCell)


But this gives the following error: ByRef argument type mistmatch

I am lost.....

Michael Arch.