How to Undo Makros

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Haw can I apply ability of Undo function after executing Macros. Is there any
appropriate property of any object we can use to add in programme code of
Macros or what ever. Thanks in advance!
 
Hi,

Most actions in Excel automatically add their undo method to the undo list
but not macros so as soon as a macro runs the undo list is lost and start to
rebuild again and that's the way Excel is designed.

To get around this you have to write you own undo routine which involves
remembering how Excel was before you macro ran. Excel provides to tools to do
this so check out

Application.OnUndo

and the examples here

http://www.j-walk.com/ss/excel/tips/tip23.htm


Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top