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

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
LVL 1
New_AlexAsked:
Who is Participating?
 
Chris BottomleySoftware Quality Lead EngineerCommented:
Not especially but you can save a copy of the workbook first and revert that way

Chris
0
 
Rory ArchibaldCommented:
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
0
 
Chris BottomleySoftware Quality Lead EngineerCommented:
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
0
 
Chris BottomleySoftware Quality Lead EngineerCommented:
Interestingly rory's link is pretty much the exact scenario I outlined and therefore helps authenticate the situation.

Chris
0
 
New_AlexAuthor Commented:
Thankz people
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.