![]() |
Undo not working with macro
Hello!
I am creating a macro that modifies some data. I have just notice that the undo feature isn't available after I use my macro. (I can' undo what my macro just did) Is there a line of code that I have to include in my macro o something?? :confused: Thanks Joh -- Message posted from http://www.ExcelForum.com |
Undo not working with macro
Hi John,
See John Walkenbach's site notes: http://www.j-walk.com/ss/excel/tips/tip23.htm --- Regards, Norman "jbchrist " wrote in message ... Hello! I am creating a macro that modifies some data. I have just noticed that the undo feature isn't available after I use my macro. (I can't undo what my macro just did) Is there a line of code that I have to include in my macro or something?? :confused: Thanks John --- Message posted from http://www.ExcelForum.com/ |
Undo not working with macro
John
not much you can do. Running a macro resets the Undo stack. I suppose, if you think about it, that's logical, as your macro could do an awful lot of things that might or might not need to be undone. Regards Trevor "jbchrist " wrote in message ... Hello! I am creating a macro that modifies some data. I have just noticed that the undo feature isn't available after I use my macro. (I can't undo what my macro just did) Is there a line of code that I have to include in my macro or something?? :confused: Thanks John --- Message posted from http://www.ExcelForum.com/ |
Undo not working with macro
Hi John
A macro can do tons of dramatic stuff, like deleting tons of folders, subfolders and files. An Undo library would have to bee just too huge to have. So you'll have to manually (aka write code for) register and save the macro actions and also write an "undo" macro for this. Typically it would be to save a copy of the workbook at the stage of macro start, and for Undo replace the workbook with this backup copy. But it all depends what the macro does. If it just changes a single cell, go for an easier solution. HTH. Best wishes Harald "jbchrist " skrev i melding ... Hello! I am creating a macro that modifies some data. I have just noticed that the undo feature isn't available after I use my macro. (I can't undo what my macro just did) Is there a line of code that I have to include in my macro or something?? :confused: Thanks John --- Message posted from http://www.ExcelForum.com/ |
Undo not working with macro
Take a look he
http://j-walk.com/ss/excel/tips/tip23.htm In article , jbchrist wrote: I am creating a macro that modifies some data. I have just noticed that the undo feature isn't available after I use my macro. (I can't undo what my macro just did) Is there a line of code that I have to include in my macro or something?? |
All times are GMT +1. The time now is 01:16 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com