ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   CheckBox assistance? (https://www.excelbanter.com/excel-programming/346088-checkbox-assistance.html)

Jacob Lane, MCP

CheckBox assistance?
 
Hello-

I am trying to create a checkbox in my spreadsheet that will change the font
color of a range of cells when checked. I have two questions about doing this:

1. How do I assign code to a specific checkbox? It doesn't seem very
intuitive.

2. Are there examples of how to do such things online?

Thanks.

Jake

Gary Keramidas

CheckBox assistance?
 
this will make the font bold in a1:a10 if the box is checked and normal font
if the box is unchecked


Private Sub CheckBox1_Click()
If CheckBox1.Value = True Then
Range("A2:a10").Font.Bold = True
Else
Range("A2:a10").Font.Bold = False
End If
End Sub

--


Gary


<Jacob Lane; "MCP" wrote in
message ...
Hello-

I am trying to create a checkbox in my spreadsheet that will change the
font
color of a range of cells when checked. I have two questions about doing
this:

1. How do I assign code to a specific checkbox? It doesn't seem very
intuitive.

2. Are there examples of how to do such things online?

Thanks.

Jake





All times are GMT +1. The time now is 04:34 AM.

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