Is there anyway to code an undo function onto a CommandButton similar to the Excel's very own undo function?
Or a function which is capable of calling Ctrl-Z shortcut key.
Add the command button to the worksheet and assign the following macro to it:
Sub UndoLastAction()
With Application
.EnableEvents = False
.Undo
.EnableEvents = True
End With
End Sub
It can only undo the last action taken by the user and cannot undo VBA commands.
EDIT: If you need further undo capabilities see: