Hi guys,
this actually is quite an old topic, I know... just found this through the search function however, and was wondering whether any of you could help me with an issue I´m facing at the moment.
What I´m trying to do is using application.OnUndo in case the "If"-value is not true... i.e. ticking the box means showing text in a cell and unticking it would trigger reverse action (deleting the previous step and the text)
my problem is that the way I´ve put it together so far doesn´t really lead to a success even though it looks good to me
This is what I´ve got so far:
Code:
Private Sub CheckBox2_Click()
Dim x As String
Dim x As String
x = "AB"
y = "A02"
If
***.CheckBox2 = True Then
***.Range("A6") = y
***.Range("d6") = x
ElseIf ***.CheckBox2 = False Then
MsgBox "deleted"
Application.OnUndo "Undo CheckBox2", "UndoCheckBox2"
End If
End Sub
Sub UndoCheckBox2()
***.Range("A6").ClearContents
***.Range("d6").ClearContents
End Sub
Would be happy about any comments or help
thanks!