Press the button to undo the last user action.
Module Code
Declare Function SendMessageBynum& Lib "user32" Alias "SendMessageA" _
(ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, _
ByVal lparam As Long)
Public Const EM_UNDO = &HC7&
Form Code
Private Sub TextUndo(T As TextBox)
SendMessageBynum T.hwnd, EM_UNDO, 0, 0
End Sub
Private Sub Command1_Click()
'replace the "Text1" below with the name of the Text Box you want to
'apply the Undo on it.
Call TextUndo(Text1)
End Sub
0 comments:
Post a Comment