PDA

View Full Version : Solved: Cell Interior.ColorIndex Property Changing



Bopo2
11-08-2009, 06:36 AM
Hey guys

Well another hicup as per usual, I check the interior.color or my cell to determine a condition, however as soon as data is typed into the cell, e.g. 6, the cell interior color index changes to the default color of cells.

I've tried finding documentation on this, but of course I couldn't find anything, I even tried changing the font color to same as the fill color of the cell to see if thee was a correlation, but sadly there isn't.

My fill color of the cell is yellow, and usually returns a Interior.ColorIndex value of 6, however with data in the cell, it returns -4142

If searchCell.Interior.Color = 6 Then
'blah
end if

Bob Phillips
11-08-2009, 06:41 AM
Try



If searchCell.Interior.ColorIndex = 6 Then
'blah
End If

Bopo2
11-08-2009, 06:48 AM
EDIT: Sorry the problem was a nested if statement, couldn't see it :(.