S
Steph
I have the following click event tied to CheckBox1 in a userform:
Private Sub CheckBox1_Click()
If CheckBox1 = True Then
Selection.SpecialCells(xlCellTypeFormulas, 23).Interior.ColorIndex = 6
ElseIf CheckBox1 = False Then
Selection.SpecialCells(xlCellTypeFormulas, 23).Interior.ColorIndex =
xlNone
End If
End Sub
I would like add the following features to be performed at the same time:
(1) display an error message if no formulas are found and
(2) turn the checkbox off (change the value to false).
When I try to set up the error handler, I seem to be getting caught in a
continuous loop. Can anyone suggest how to set up an efficient error
handling routine?
Thank you.
Private Sub CheckBox1_Click()
If CheckBox1 = True Then
Selection.SpecialCells(xlCellTypeFormulas, 23).Interior.ColorIndex = 6
ElseIf CheckBox1 = False Then
Selection.SpecialCells(xlCellTypeFormulas, 23).Interior.ColorIndex =
xlNone
End If
End Sub
I would like add the following features to be performed at the same time:
(1) display an error message if no formulas are found and
(2) turn the checkbox off (change the value to false).
When I try to set up the error handler, I seem to be getting caught in a
continuous loop. Can anyone suggest how to set up an efficient error
handling routine?
Thank you.