• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

shortcut key for undo

Hi, sparcle!


There's no automatic shortcut for undoing operations made within a macro. If anything'd need to be undone, you should store the previous states of everything changed and then restore them upon proper condition.

Give a look to these links, maybe you find them useful:

http://stackoverflow.com/questions/339228/building-undo-into-an-excel-vba-macro

http://www.teachexcel.com/excel-help/excel-how-to.php?i=515841


The Application.Undo method cancels the last action done in the user interface.


There's another method, Application.OnUndo (text, procedure), that sets a tag (text) to establish the Undo menu element and the procedure name associated to be run if you choose Undo from Edit menu after running the procedure that sets this property. If a procedure doesn't use OnUndo method, Undo command will be disabled.


If further help needed, go to the VBA editor, type OnUndo in the Immediate window pane, click over typed characters and press F1 to get the built-in Excel help.


Regards!
 
Hi, sparcle!

Glad if it helped you. Thanks for your feedback and for your kind words too. Welcome back whenever needed or wanted.

Regards!

PS: I'm absolutely taking it easy :p
 
Back
Top