Hi
I want to insert a formula in the cell left to a check box, if the CheckBoxes.Value = xlOn :
Sub test()
For i = 53 To 102
If ActiveSheet.CheckBoxes(i).Value = xlOn Then
ActiveSheet.CheckBoxes(i).TopLeftCell.Offset(1, 0).Formula = ("=2+2")
End If
Next i
End Sub
My problem: When there is an = sign in the formula (e.g. ("=2+2")), the formula is inserted to all the cells, eaven if the check boxes = xlOf.
If i remove the = sign (e.g. ("2+2")) the formula is inserted only in the cells to left of the check boxes = xlOn. In other word the expected behaviour. Any idea?
Eivind
I want to insert a formula in the cell left to a check box, if the CheckBoxes.Value = xlOn :
Sub test()
For i = 53 To 102
If ActiveSheet.CheckBoxes(i).Value = xlOn Then
ActiveSheet.CheckBoxes(i).TopLeftCell.Offset(1, 0).Formula = ("=2+2")
End If
Next i
End Sub
My problem: When there is an = sign in the formula (e.g. ("=2+2")), the formula is inserted to all the cells, eaven if the check boxes = xlOf.
If i remove the = sign (e.g. ("2+2")) the formula is inserted only in the cells to left of the check boxes = xlOn. In other word the expected behaviour. Any idea?
Eivind