VBA BackColor property of checkbox control is used to change or sets the background color of checkbox control.

PREMIUM TEMPLATES LIMITED TIME OFFER

ON SALE80% OFF

50+ Project Management Templates Pack
Excel PowerPoint Word

Advanced Project Plan & Portfolio Template
Excel Template

Business Presentations Templates Pack
PowerPoint Slides

20+ Excel Project Management Pack
Excel Templates

20+ PowerPoint Project Management Pack
PowerPoint Templates

10+ MS Word Project Management Pack
Word Templates


CheckBox BackColor Property

[RGB Color Code]

Or

CheckBoxName.BackColor=[Hexa Decimal]

Where CheckBoxName represents a CheckBox object. In the above syntax we are using a ‘BackColor’ property of CheckBox object to change back ground color of CheckBox object.

CheckBox BackColor Property – Example

Here is the example for CheckBox Back Color Property. It will take you through how to change back color property of Check Box using Excel VBA. Here you can find or see how we are changing back color property of Check Box manually or using code.

CheckBox BackColor Property: Change Manually

Please find the following details how we are changing manually back Color of CheckBox property.

  1. Go To Developer Tab and then click Visual Basic from the Code or Press Alt+F11.
  2. Go To Insert Menu, Click UserForm. Please find the screenshot for the same.
  3. Excel VBA UserForm CheckBox

  4. Drag a CheckBox on the Userform from the Toolbox.Please find the screenshot for the same.
  5. CheckBox Properties_D

  6. Right click on the Check Box. Click on properties from the available list.
  7. CheckBox Properties1

  8. Now you can find the properties window of CheckBox on the screen. Please find the screenshot for the same.
  9. CheckBox Properties

  10. On the left side find ‘BackColor’ from the available Check Box properties.
  11. On the right side you can see the list of color codes.Please find the below screen shot for the same.
  12. BackColor Property of CheckBox Control

  13. You can change the back color according to your wish from the available color codes.
  14. Now, You can see the back ground color of Check Box Control.

CheckBox BackColor Property: Change Using Code

Please find the following details how we are changing back color of CheckBox property with using Excel VBA code.

  1. Go To Developer Tab and then click Visual Basic from the Code or Press Alt+F11.
  2. Go To Insert Menu, Click UserForm. Please find the screenshot for the same.
  3. Excel VBA UserForm CheckBox

  4. Drag a CheckBox on the Userform from the Toolbox. Please find the screenshot for the same.
  5. CheckBox Properties_D

  6. Double Click on the UserForm, and select the Userform event as shown in the below screen shot.
  7. Check Box Excel ActiveX Control _Im1

  8. Now can see the following code in the module.
  9. Private Sub UserForm_Initialize()
    End Sub
    
  10. Now, add the following example code1 or code2 to the in between above event procedure. The procedure should be shown as below.
  11. Example Code1: Using RGB

    'Back Color Property of CheckBox Control
    Private Sub UserForm_Initialize()
    CheckBox1.BackColor = RGB(153, 153, 255)
    End Sub
    

    Example Code2: Using Hexa Decimal

    'Back Color Property of CheckBox Control
    Private Sub UserForm_Initialize()
    CheckBox1.BackColor = &HFF8080
    End Sub
    

    Output:

    BackColor Property of CheckBox_O

LIMITED TIME OFFER

Leave A Comment


Related pages


how do you identify duplicates in excelmicrosoft office invoice templates for excelxls to xml conversionpivot sql examplesexcel vba sql connection stringexcel vba open filetraining schedule template excelcells vbavba tutorialsvba application.worksheetfunctionvba excel direxcel macro remove duplicatesunhide workbook excel 2010excel practice tests for interviewsmicrosoft excel exam questions and answersproject status report template powerpointvba option buttonunprotected excelvba learningsoftware project plan template excelmacro in xlsexcel highlight columnexcel unlock spreadsheetpivot tables tutorialsoutlook.application vbawith selection vbahow to set macro security in excel 2010bubble chart excel templateloop through worksheets vbacontains vbanested if statement excel 2010excel macro activecellexcel pivot tutorialhlookup excel 2010vba open file dialogworksheet.protectvba chart titleopen xlsx files in excel 2003excel vba list files in foldervba macros in excelexcel vba calculatevba excel instrdelete vbacool excel tablesduplicate values in excelexcel vba return arraywhat is iserror in excelconvert excel table to normal rangesql telephonic interview questionssql query operatorsmarketing gantt chart templatehow to remove duplicate rows in excel 2003how to remove all blank rows in exceloutlook vba referencetrim excel formulalookup function in excel examplevb copy filefso copyfilepivottable in excelexcel macro programming examplesms access vba msgboxvba excel open text filevba sheet protectionhow to protect a worksheet in excelvba word application objectcopy and paste macroexcel vba database exampleshlookup example excel 2010how to use excel sumifexcel macro columnvba referenceexcel vba namesvba code to save excel fileexcel vba import text fileexcel vba password recovery codeworkbook save vbasumif example excel 2010vba coding