ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Excel - Check Box Functions (https://www.excelbanter.com/excel-worksheet-functions/230009-excel-check-box-functions.html)

Mags

Excel - Check Box Functions
 
Is it possible to add a function to a check box so that when it's checked,
the words in an associated cell will automatically strike through?

T. Valko

Excel - Check Box Functions
 
If you have a linked cell assigned to the check box then you can use
conditional formatting to do this.

Assume the linked cell is A1 and the cell to strikethrough is B1

Select cell B1
Goto the menu FormatConditional Formatting
Select the Formula Is option
Enter this formula in the box on the right:
=A1
Click the Format button
Select the Font tab
Select Strikethrough
OK out

--
Biff
Microsoft Excel MVP


"Mags" wrote in message
...
Is it possible to add a function to a check box so that when it's checked,
the words in an associated cell will automatically strike through?




Harald Staff[_2_]

Excel - Check Box Functions
 
Everything is possible in Excel with macros enabled.
Here's one to assign to a checkbox 1 from the Forms toolbar onto the first
worksheet:

Sub Check()
If Sheets(1).CheckBoxes(1).Value = 1 Then
Sheets(1).Range("A1").Font.Strikethrough = True
Else
Sheets(1).Range("A1").Font.Strikethrough = False
End If
End Sub

HTH. Best wishes Harald

"Mags" wrote in message
...
Is it possible to add a function to a check box so that when it's checked,
the words in an associated cell will automatically strike through?




All times are GMT +1. The time now is 09:13 PM.

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