Get RGB settings
I can extract the pallette value using the code below.. If there is a
requirement to reuse this color elsewhere then you won't need RGB
because all other objects will work with the same pallette..however if
you still need RGB for another purpose let me know.
----------------------------
For Each Shape In ActiveSheet.Shapes
msg = msg & vbCrLf & Shape.Name & " " &
Shape.Line.ForeColor.SchemeColor
Next
MsgBox (msg)
----------------------------
Zone wrote:
The Line is a drawing object. Thanks, James
wrote:
By line I can't determine if you have a drawing object or cells which
have their pattern set to the pallette.. If it is the cells color then
the VBA code to return it's pallette value is:
-----------------------------
With ActiveCell.Interior
.ColorIndex = NumColor
End With
msgbox (NumColor)
-----------------------------
I am not sure how to extract RGB values from the pallettes own settings
but if you become more clear on the requirement I am sure there is some
solution we can locate.
HTH,
Will
Zone wrote:
I have a line on a worksheet and its color is set with RGB settings. I
want to select the line and run a macro that will show me the RGB
settings. TIA, James
|