ExcelRibbon.Tips.Net ExcelTips (Ribbon Interface)

Resizing Checkboxes

Please Note: This article is written for users of the following Microsoft Excel versions: 2007 and 2010. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Resizing Checkboxes.

When working in VBA, one of the things you can create is known as a "user form." These forms provide you with the ability to essentially create your own dialog boxes. You can add many different types of controls to a user form, if desired. For instance, you can add labels, text boxes, drop-down lists, radio buttons, and many other controls. Some of the controls you can resize; others you cannot. One that you cannot resize is a checkbox. While you can modify the font size used for the label next to the checkbox, you cannot resize the checkbox itself.

If you find the checkboxes in your user forms too small for your taste, you can "work around" them by simulating a checkbox. You do this by actually creating a label instead of a checkbox. Then, change the properties of the label so that it has a transparent background, and that the font being used is Wingdings. You should also make sure that the font is set to a large size, such as 20 or 26 points.

Now, double-click on your label, which should open a code window. The event that you are programming is the Click event for the label, which means it will be executed whenever the label is clicked. Use this as your code:

Private Sub Label1_Click()
    If Label1.Caption = Chr(254) Then
        Label1.Caption = Chr(168)
        Label1.Caption = Chr(254)
    End If
End Sub

In the Wingding font, Chr(254) is box with a checkmark, and Chr(168) is a box with no checkmark. When you execute the user form and click on the label, it switches between an empty box and a checked box. You can also add other code to the Click event that performs other tasks, as necessary.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (8566) applies to Microsoft Excel 2007 and 2010. You can find a version of this tip for the older menu interface of Excel here: Resizing Checkboxes.

Related Tips:

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!


Leave your own comment:

  Notify me about new comments ONLY FOR THIS TIP
Notify me about new comments ANYWHERE ON THIS SITE
Hide my email address
*What is 4+5 (To prevent automated submissions and spam.)
          Commenting Terms

Comments for this tip:

Murray    14 Jul 2015, 07:57
Me again. I Googled the issues I was having and mine was by no means an isolated case. Throw in virtual desktops and things can get ugly very fast. I ended up going back to good 'ol form controls rather than ActiveX. Yes, they are pretty basic, but they do the basics reliably. With a few techniques, you can pretty much achieve the same results. I wish the ActiveX controls worked better, because they look a lot better...
Murray    13 Jul 2015, 22:41
A couple of things I noticed.
Firstly the code on this page is identical to the other page for Excel 2003. I was looking to use this with a customer with a mixed environment (2003/2010). There is no clear difference indicated in the implementation. Secondly, for no apparent reason after resizing the boxes a little I found that after each click the font got smaller and smaller till it was no longer possible to see the checkbox, let alone click on it. Toggling the autosize property restores the proper size, but then it diminishes back to nothing when out of design mode.
Roger    25 Mar 2015, 09:43
I think I found the solution to my problem. http://stackoverflow.com/questions/27411399/microsoft-excel-activex-controls-disabled
Roger    23 Mar 2015, 16:12
This works great when I first do it. However, when I save the workbook and re-open it, it no longer functions. Clicking on the label control no longer has any effect, and I can't add another one on the sheet. I've tried several times; Moved the code fromthe sheet to a standard module; Checked the trust settings (Office 2010); Saved the workbook as xlsm, xlsb, and xls; None of them work when re-opened. When I try to change the properties, I get the sheet properties instead.
Marc    09 Jan 2015, 16:19
Got it! Thanks for this workaround, it's great!!
Marc    09 Jan 2015, 16:13
I have created this code as recommended but the item that appears in the label is the actual symbol that would appear in the bar above when the wingding is normally used, not the box with or without the check mark. So the checked box is actually a lower case b with a tail on the bottom and the unchecked box looks like a colon. Is there a fix for this?
Kenneth    04 Sep 2014, 13:16
Can someone please explain this step by step so the average Joe can understand this. Thank you

Our Company

Sharon Parq Associates, Inc.

About Tips.Net

Contact Us


Advertise with Us

Our Privacy Policy

Our Sites


Beauty and Style




DriveTips (Google Drive)

ExcelTips (Excel 97–2003)

ExcelTips (Excel 2007–2016)



Home Improvement

Money and Finances


Pests and Bugs

Pets and Animals

WindowsTips (Microsoft Windows)

WordTips (Word 97–2003)

WordTips (Word 2007–2016)

Our Products

Helpful E-books

Newsletter Archives


Excel Products

Word Products

Our Authors

Author Index

Write for Tips.Net

Copyright © 2015 Sharon Parq Associates, Inc.