'** Code for the module: **
Public undo_SheetName As String
Public undo_Row As Long
Sub undomacro()
'Undo the effects of cmdCopy_click_Click
If (undo_SheetName = "") Or (undo_Row < 1 Or undo_Row > 65536) Then
MsgBox "Sorry, couldnt find the pasted row.", vbExclamation
Else
'We have valid sheet/row, so undo!
Worksheets(undo_SheetName).Rows(undo_Row).Clear
'Instead of a .Clear you could reset the old values (if you store them in your macro!)
End If
End Sub
'** Changes to your macro: **
...
End Select
'Store undo info
undo_SheetName = strSheetName
undo_Row = i
'you could (somehow) store the current values of the target row here
ActiveSheet.Rows(ActiveCell.Row).EntireRow.Copy Destination:=Worksheets(strSheetName).Rows(i)
'enable Undo
Application.OnUndo "Undo the macro", "undomacro"
Unload Me
...