Solved

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

Posted on 2011-09-06
5
400 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

707 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now