1

Topic: VBA Excel: Rollback of changes of a macro?

Hello.
It appears in Excel it is impossible regular means to roll away change made a macro on CTRL+Z
Esteemed forums, all get out on a miscellaneous. As can. Someone does  book sheets who that remembers an array of cells and then recovers them...
As it seemed to me - I got out also: before change I remember cell contents + I conduct the counter of the remembered elements.
Read that that on CTRL+Z it was possible to make rollback of changes, it is necessary to interpose the code in the end of a changing macro:

Application. OnUndo "a canceling of changes", "ActionUndo"

, Where ActionUndo - procedure doing a canceling of changes.
At me it turned out. But a problem that the canceling of actions works only once.
For example, if rollback of changes to make on button click all works on hurrah. And on CTRL+Z - only once.
Prompt, it I somewhere did not watch or so it and is?

2

Re: VBA Excel: Rollback of changes of a macro?

Modeling file with "a manual on playback" - in studio. By itself from superfluous to clean...

3

Re: VBA Excel: Rollback of changes of a macro?

MAULER wrote:

so it also is?

so it also is. After the first such rollback of the marksman becomes inactive.

4

Re: VBA Excel: Rollback of changes of a macro?

I apply a file.
There all is simple: import to 3 cells three string values and push CTRL+Z
The last will be rolled away only.

5

Re: VBA Excel: Rollback of changes of a macro?

The_Prist;
And how that it is possible to overcome it or nevertheless to be content with one rollback of changes?