Excel - Check Box Functions

  • Thread starter Thread starter Mags
  • Start date Start date
M

Mags

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?
 
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 Format>Conditional 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
 
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
 
Back
Top