Solved

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

Posted on 2011-09-06
5
406 Views
Last Modified: 2012-05-12
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
0
Comment
Question by:New_Alex
  • 3
5 Comments
 
LVL 59

Accepted Solution

by:
Chris Bottomley earned 400 total points
ID: 36486840
Not especially but you can save a copy of the workbook first and revert that way

Chris
0
 
LVL 85

Assisted Solution

by:Rory Archibald
Rory Archibald earned 100 total points
ID: 36486855
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
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 36486857
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
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 36486871
Interestingly rory's link is pretty much the exact scenario I outlined and therefore helps authenticate the situation.

Chris
0
 
LVL 1

Author Closing Comment

by:New_Alex
ID: 36511124
Thankz people
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Office Picture Manager is not included in Office 2013. This comes as a shock to users upgrading from earlier versions of Office, such as 2007 and 2010, where Picture Manager was included as a standard application. This article explains how…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question