ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   how do I make checkbox color change when the value changes? (https://www.excelbanter.com/excel-discussion-misc-queries/67802-how-do-i-make-checkbox-color-change-when-value-changes.html)

Lynda

how do I make checkbox color change when the value changes?
 
I am using a checkbox. I would like the color of the check box to change
when checked. Is that possible?

Bob Phillips

how do I make checkbox color change when the value changes?
 
If the checkbox is a control toolbox checkbox, use

Private Sub CheckBox1_Click()
With Me.CheckBox1
If .Value Then
.BackColor = RGB(255, 0, 0)
Else
.BackColor = RGB(255, 255, 255)
End If
End With
End Sub


--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Lynda" wrote in message
...
I am using a checkbox. I would like the color of the check box to change
when checked. Is that possible?




Lynda

how do I make checkbox color change when the value changes?
 
Thank you!

"Bob Phillips" wrote:

If the checkbox is a control toolbox checkbox, use

Private Sub CheckBox1_Click()
With Me.CheckBox1
If .Value Then
.BackColor = RGB(255, 0, 0)
Else
.BackColor = RGB(255, 255, 255)
End If
End With
End Sub


--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Lynda" wrote in message
...
I am using a checkbox. I would like the color of the check box to change
when checked. Is that possible?






All times are GMT +1. The time now is 04:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com