Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50061

Macro to change shape/macro button colours based on selection

$
0
0
Hi everyone,

The title basically says it all. I have 3 Rectangles on my sheet (Rectangle 1, Rectangle 2, Rectangle 3) that will be assigned to the macro. If all the shapes are red, I want the shape that is clicked to turn green. When one of the other shapes is then clicked it will go green and the other shape that was previously clicked will go back to red. The selections must also link to a specified cell.

To sum it up:

All the rectangles are red. Rectangle 1 is then clicked and it changes to from red to green and cell A1 = 1
Rectangle 2 is then clicked and changes from red to green, Rectangle 1 will then change back to red and cell A2 = 2
(repeat process if Rectangle 3 is clicked)

This will basically give me the same functionality as if there were 3 radio buttons however the shapes and colours stand out much better.

Many thanks!!

Viewing all articles
Browse latest Browse all 50061

Trending Articles