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

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

Posted on 2011-09-06
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
Question by:New_Alex
  • 3
LVL 59

Accepted Solution

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

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

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.

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.


Author Closing Comment

ID: 36511124
Thankz people

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone 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

This article will show you how to use shortcut menus in the Access run-time environment.
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

790 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