Thread: Undo button
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Harald Staff Harald Staff is offline
external usenet poster
 
Posts: 292
Default Undo button

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

"Orf Bartrop" skrev i melding
...
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