I have an old macro that was working fine on Excel 2003 but creates issues with Excel 2010. The part that causes problems is:
If Not IsNull(someRange.FormatConditions(parActiveCondition).Interior.Color) Then
locVisibleColor = someRange.FormatConditions(parActiveCondition).Interior.Color
End if
where parActiveCondition is the active conditional formatting number on someRange.
When the background is selected as “No Color”, someRange.FormatConditions(parActiveCondition).Interior.Color returns
Nullin Excel 2003- 0 in Excel 2010
The problem is that a black background also returns 0. So in Excel 2010 it seems no longer possible to make the difference between a black background and no background color.
Does anybody know a workaround?
ps: I could obviously select a white background instead of “No Color” but I’d rather not change all the spreadsheets and conditional formatting rules.
You could use a Boolean secondary check such as
when