Excel VBA, Undo WorkSheet modifications, done by VBA script,

New_Alex
New_Alex used Ask the Experts™
on
I have notice that attempting to undo modifications (line insertions / deletions etc) done by VBA script is not possible.

Is it any way to make it possible???

Thanks so much
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Software Quality Lead Engineer
Top Expert 2011
Commented:
Not especially but you can save a copy of the workbook first and revert that way

Chris
Most Valuable Expert 2011
Top Expert 2011
Commented:
It is possible, but you have to code it yourself (or do something like Chris suggested): http://j-walk.com/ss/excel/tips/tip23.htm

Regards,
Rory
Chris BottomleySoftware Quality Lead Engineer
Top Expert 2011

Commented:
Note by not especially what I mean is you can create code that undoes the activities for example if you modify a range of cells in code then first save the workbook, change the cells in code, do something else as much as appropriate, finally to undo the cell edits, copy the data from the copy back into the original book.

Now the cell edits are undone but the other changes have been retained.  Obviously though any undo has to be specifically coded for this approach.

Chris
Chris BottomleySoftware Quality Lead Engineer
Top Expert 2011

Commented:
Interestingly rory's link is pretty much the exact scenario I outlined and therefore helps authenticate the situation.

Chris

Author

Commented:
Thankz people

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial