?
Solved

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

Posted on 2011-09-06
5
Medium Priority
?
416 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 59

Accepted Solution

by:
Chris Bottomley earned 1600 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 400 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Cancel future meetings from user mailboxes in Office 365 using Remove-CalendarEvents
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

765 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