Validating User Input

  • I have a combo box that triggers a message box when someone tries to change its value, i.e.

    Private Sub myComboBox_BeforeUpdate(Cancel As Integer)

       Dim Repsonse As Integer

       Response = MsgBox("Permanently change the data in this field?", vbOKCancel, "Confirm")

       If Response = 2 Then    'Cancel

          'Restore Control to previous state 

       End If

    End Sub

    My question is this: what code to I put in to restore the control's text to whatever it was before the user changed it? 

    Thanks.

    Aaron

  • Hi All,

    Nevermind.  I found my answer on google.  the code is

    me.undo

    I suppose I should do a little more research before I ask for help.  Thanks.

    Aaron

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply