Forum Discussion
Willie Van Schalkwyk
Sep 08, 2017Copper Contributor
Undo Macro actions
Hi There
I've created a macro that copy some lines and delete values manually entered. I then entered a row above the lines being copied and now the macro has deleted al my formulas - which took me two days to develop.
Is it possible to undo actions executed via a macro or to retrieve versions of an excel file prior to running the macro?
Thanks in advance for the support.
- Zack BarresseIron ContributorSorry, but if you didn't create a backup, your work is gone. When VBA code makes a change on the grid, it clears the undo stack. Unfortunately, Excel doesn't have a special UndoRecord method like Word does. I don't know why, it'd be pretty awesome.
First rule of spreadsheeting: always keep a backup.
Second rule of spreadsheeting: always keep a backup of your backup.
Third rule of spreadsheeting: backup your backups.
Fourth rule of spreadsheeting: save often, backup more often. - Brian SpillerBrass Contributor
Close without Saving and then reopen.
Restore from an AutoSaved version.
In any case, the Undo thread gets fouled up, so always be careful when working with macros that have yet to fully tested.
(But I couldn't be as effecient without them !)