Excel 2007 — July 21, 2011 8:15 pm

Custom Colours for Checkboxes in User Forms Excel 2007

Posted by

How to make a checkbox in Excel match the fill of a cell, background or text colour

This guide is using Excel 2007.

Select the cell which has the fill you require, then in the Home ribbon select the fill icon, and click on More Colors…

Excel 2007

In the Colors dialogue select the Custom tab. Take a note of the RGB code for the fill of the cell. So in the screen shot the RGB is 255,204,153.

Excel 2007

Now you need to convert the RGB value to Hexadecimal. I would recommend using http://www.endprod.com/colors/rgb2hex.htm but you can always Google for a different converter.

 

Now with your Hex value you need to format it ready for input into Excel. The simple explanation is that for Excel you need to build a String to enter as the BackColor property.

 

The String will start with &H00 followed the Hex you just generated. However, you need to swap the last two characters of the hex string with the last, so if your Hex code is ffcc99 then you need to use 99ccff. So, now you have your string &H00*****, where the asterisks are replaced with your Hex code add a final & to the string and you are now ready to go.

Return to Excel, in the Developer tab on the Ribbon (to add Click the Microsoft Office Button, and then click Excel Options. Click Popular, and then select the Show Developer tab in the Ribbon check box) click on the Design Mode icon. Now single click on the CheckBox you want to change the color of and then in the Properties box enter your new color string in the BackColor, or if it is for the text color enter the string into the ForeColor property.

  • Share this post:
  • Facebook
  • Twitter
  • Delicious
  • Digg

Warning: fopen(/www/sites/d0f/8ae/www.matthewhollander.com/web/wp-content/plugins/wp-google-plus-one/lib/standard.txt) [function.fopen]: failed to open stream: No such file or directory in /www/sites/d0f/8ae/www.matthewhollander.com/web/wp-content/plugins/wp-google-plus-one/plusone.php on line 104

Warning: fread(): supplied argument is not a valid stream resource in /www/sites/d0f/8ae/www.matthewhollander.com/web/wp-content/plugins/wp-google-plus-one/plusone.php on line 105

Warning: fclose(): supplied argument is not a valid stream resource in /www/sites/d0f/8ae/www.matthewhollander.com/web/wp-content/plugins/wp-google-plus-one/plusone.php on line 106
.