Supongo que has declarado la
API antes:
Private Declare Function SendMessage Lib "User32" Alias "SendMessageA" _
(ByVal hWnd As Long, ByVal wMsg As Long, _
ByVal wParam As Long, ByVal lParam As Long) As Long
Private Sub deshacerCmd_Click()
Const EM_CANUNDO As Long = &HC6
Const EM_UNDO As Long = &HC7
'
' se comprueba si se puede deshacer
If SendMessage(Text1.hWnd, EM_CANUNDO, 0&, 0&) Then
' si es así, se deshace
SendMessage Text1.hWnd, EM_UNDO, 0&, 0&
End If
End Sub
Fuente:
http://www.elguille.info/Net/vb6anet/textbox01.htm#DeshacerlaultimamodificacionEspero que al boton le hallas llamado igual...
Salu2!