Harry Covair
Member
In a VBA procedure, I’m working with shapes.
As you can see in the code below, each shape has a colored background
And some text is written in the shape with a white font color.
This is handy when the background is dark colored but becomes unreadable in case of light background.
Do some members of the forum have a suggestion how to decide in VBA to write the text in light of dark font color in function of the background?
Thanks in advance for your help.
Harry
As you can see in the code below, each shape has a colored background
Code:
With objshp
.Select
.TextFrame.Characters.Text = Cells(my_row, 3).Value
.Fill.ForeColor.RGB = RGB(col_red, col_green, col_blue)
End With
And some text is written in the shape with a white font color.
This is handy when the background is dark colored but becomes unreadable in case of light background.
Do some members of the forum have a suggestion how to decide in VBA to write the text in light of dark font color in function of the background?
Thanks in advance for your help.
Harry