Undo button

  • Thread starter Thread starter Orf Bartrop
  • Start date Start date
O

Orf Bartrop

I want to create an Undo button in a workbook. I know how to create the
button but not the code to go with it. How is this done.
The reason for the button is that all toolbars will be hidden in the
final product.

Orf Bartrop
 
Hi Orf

Pretty simple -but also pretty limited:

Sub RegretAction()
Application.Undo
End Sub

Note that Undo must be the very first command in a macro like this to work,
and that it's a strict "last action only" undo without the history. So
consider putting the built-in Undo button onto a new custom toolbar instead
and keep that one visible.

HTH. Best wishes Harald
 
Thanks Harald. Your code is just what I wanted as there would only be
one undo required..
 
Back
Top