jolivanes
06-26-2011, 12:32 PM
I have the following code for a command button on a userform
Private Sub CommandButton1_Click()
Set r = Selection
r.Interior.Color = rgb(75, 172, 198)
End Sub
Works great if a shape has been selected that needs to be colored.
If no shape was selected, and a cell is still selected, the cell gets colored.
This is not what I want.
How can I check if a Shape has been selected?
The shapes (40+ shapes) are all named with 7 letters and 1 or 2 digits (i.e. rndBall25)
Thanks and Regards.
John
Private Sub CommandButton1_Click()
Set r = Selection
r.Interior.Color = rgb(75, 172, 198)
End Sub
Works great if a shape has been selected that needs to be colored.
If no shape was selected, and a cell is still selected, the cell gets colored.
This is not what I want.
How can I check if a Shape has been selected?
The shapes (40+ shapes) are all named with 7 letters and 1 or 2 digits (i.e. rndBall25)
Thanks and Regards.
John