using checkbox to calculate another cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have the following code in a macro for a checkbox and it gives a error of
object required any suggestions?


Private Sub CheckBox19_Click()
If CheckBox19.Value = True Then
Range("I24").Select
ActiveCell.FormulaR1C1 = "=0.07*R[-1]C"
Else: Range("I24").Select
Selection.Value = 0
End If
End Sub
 
Assue you use control Check box with cell link of "J7", try

Sub CheckBox19_Click()


If Range("j7").Value = True Then
Range("I24").Select
ActiveCell.FormulaR1C1 = "=0.07*R[-1]C"
Else
Range("I24").Select
Selection.Value = 0
End If
End Sub

George
 
Back
Top