Visual Basic Undo event happens when the user undoes a change to a combo
box control, a form, or a text box control.
Undo Event Visual Basic Example:
The following example shows how to trap the undo event on a
form. In this case we will confirm that the user wants to cancel the undo
operation.
Private Sub Form_Undo(Cancel As Integer)
If MsgBox("Do you want to cancel the Undo?",vbYesNo) = vbYes Then
Cancel = True
Else
Cancel = False
End If
End Sub