Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Tdebb8594
 
Posts: n/a
Default checkbox and macros

I am trying to make a checkbox work as an on off switch. I would like it to
change the background color of a group of cells. Is this possible?
  #2   Report Post  
Ron de Bruin
 
Posts: n/a
Default

Hi Tdebb8594

If you use a checkbox from the control toolbox you can use this code in the
Click event

Private Sub CheckBox1_Click()
If Me.CheckBox1.Value = True Then
Range("A1:A10").Interior.Color = vbRed
Else
Range("A1:A10").Interior.Color = xlAutomatic
End If
End Sub




--
Regards Ron de Bruin
http://www.rondebruin.nl



"Tdebb8594" wrote in message ...
I am trying to make a checkbox work as an on off switch. I would like it to
change the background color of a group of cells. Is this possible?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"