vendredi 10 septembre 2021

Cell Interior Color Changes with Fill Pattern

I have an application that reads the color value of a cell and acts based upon that color. I'm finding inconsistencies in the return value of the Interior.Color property, when there is also a fill pattern in the cell. For example, if the cell color is RGB(165,165,165) with no pattern, the Interior.Color property returns 10855845 as expected. But if the cell also has Interior.Pattern set to "xlPatternDown", the Interior.Color property returns 10921638, which is RGB(166,166,166). I find nothing in the MicroSoft documentation of these properties to indicate an interdependency. Can anyone shed some light on what's going on?

BTW, I fully realize that using cell color may not be the best approach. I've inherited this problem, and will eventually change the approach. But the scope of that will require extensive changes I can't execute right now.

Aucun commentaire:

Enregistrer un commentaire