Use Shapes as Option-Buttons - Auto Coloring Groups

preview_player
Показать описание

Shapes in Microsoft Excel don't naturally allow you to click on one and for it to obtain a color, while the other shapes in a group will turn grey. In this video, I'll show you how to take a cluster of shapes and allow the user to click on one button and all other buttons become grey. It's powerful, because this could become the next generation of option buttons/option groups!

Fantastic Developer Tools:

00:00 Intro
01:22 Get Shape Color Code
02:05 Explaining Recorded Code
02:41 Clean Up Code!
04:10 Dealing With Typical Shape Issue
05:35 Make it Dynamic - Any Shape Grey
07:24 Making Multiple Color Macros
09:10 Labeling System
12:08 Which Button Called the Macro?
14:27 Get Group Name If Exists
15:56 Error Planning
17:43 Looping Through Shapes in a Group
Рекомендации по теме
Комментарии
Автор

Cool example Dan! Thanks for sharing how to approach this problem. Thumbs up!!

wayneedmondson
Автор

Nice solution Daniel. I would use SELECT CASE versus all the ELSE IFs, but works exactly the same either way. Merry Christmas

krn
Автор

omg shift F8, is nice too :D
i always added a new breakpoint and F5, my my

Husky_Passion
Автор

Excellent Video Dan.
Hi Dan. Can you Show how to Create a Class using (With Events).
Example. I Have a Userform and I am creating 10 labels and 10 buttons Dynamically on startup. Userform initialize event.
I want to be able to use the mouse move event on the labels and the click event on the buttons.
I don't know how to call the Class using (with events) from the Userform after they are created dynamically. Can you help

danp
Автор

at least i learned 2 things : parentgroup, and moving the run stack in vbe with the mouse wich is huge for debugging

Husky_Passion
Автор

Good day .. if you please help me to solve a problem I faced .. How to convert excel 2016 to excel 265 in vba



Because I faced a problem with libraries

amrshaker
Автор

option explicit ? Probably not a bad idea

Husky_Passion
Автор

5:26 yeah it's stupid, because it is.
ActiveSheet.Shapes("Rectangle 1").ShapeStyle = msoShapeStylePreset39
Tried this works, as i thought.
Why use a shaperange on an object who is already a shape?
Do you often use sheet1.parent.child or BS like this ?

Husky_Passion
Автор

Your audio is only on my left headphone speaker, which is kinda annoying. Otherwise, really awesome video!!

jingiz