Lesson#127: Trick to make a color picker with VBA

An easy and simple trick to make a color picker will be shown here.

Here I have made a color palette by coloring different cell with different colors. This palette allows us to pick different type of color by selecting cell.

I designated a certain area where the chosen color will be shown.

Now I have inserted a button from developer tab and assigned a simple macro.

Sub Button2_Click()
Range(“O2:R8”).Interior.Color = ActiveCell.Interior.Color
End Sub

Where as Range(“O2:R8”) is the designated area for showing the picked color.

Now you have to select any color palette and click on the button to show the color in the O2;R8 area.

Here I have given the file for you.

Puspendu is the founder author of Excelabcd. He is a creative person, blogger and Excel-maniac guy.

Leave a Reply

Your email address will not be published. Required fields are marked *

*