May 16, 2008

Return Colour Color of a Cell

'Return Background Colour of a Cell
'http://www.vbaexpress.com/kb/getarticle.php?kb_id=494


Public Function colorIndex(r As Range) As Long
colorIndex = r.Interior.colorIndex
End Function


'Return Text Colour of a Cell
Public Function textColorIndex(r As Range) As Long
colorIndex = r.font.colorIndex
End Function