A Color Picker Dialog BoxThis tip demonstrates a technique to display a dialog box that allows the user to select a color. How it worksThe example file contains the following:
The GetAColor function sets up the dialog box and display it (see the figure below). The function returns the color value of the selected button. If the user clicks Cancel, the GetAColor function returns False. As the user moves the mouse pointer over the color buttons, the Color Sample image displays the color.
Using the functionTo use the GetAColor function in your own workbooks, export UserForm1, Module1, and Class1, and then import them into your workbook. Write your own subroutine that calls the GetAColor function.
|