Hello,
I have created a basic color scale with the conditional formatting Excel(2010) function (with 3 colors).
And now I want in VBA to loop on the cells of the "color scale" in order to get each (background) color value (in order to use the color on shapes)
But I only get -4142 value for each cell.
OK, it is because the cell background has actually, no color, it is the format condtion which applies color. So I need for each cell to take over the formatCondition object and get the interior.color or interior.colorindex property...
but it seems this is not possible... The program fails with error like 'not right property,etc...'
Have you any idea on how to do this ?
NB: I have found a solution by using a copy of the color scale... in Mirosoft Word, and a paste back in Excel (!!),
http://www.excelforum.com/excel-gen...led-color-rgb-generated-by-color-scale-2.html
it works great, but i'm wonderging if there was another more elegant solution...
Thank you for your help.
I have created a basic color scale with the conditional formatting Excel(2010) function (with 3 colors).
And now I want in VBA to loop on the cells of the "color scale" in order to get each (background) color value (in order to use the color on shapes)
But I only get -4142 value for each cell.
OK, it is because the cell background has actually, no color, it is the format condtion which applies color. So I need for each cell to take over the formatCondition object and get the interior.color or interior.colorindex property...
but it seems this is not possible... The program fails with error like 'not right property,etc...'
Have you any idea on how to do this ?
NB: I have found a solution by using a copy of the color scale... in Mirosoft Word, and a paste back in Excel (!!),
http://www.excelforum.com/excel-gen...led-color-rgb-generated-by-color-scale-2.html
it works great, but i'm wonderging if there was another more elegant solution...
Thank you for your help.