I had thought before, and had heard and read that "undoing" a VBA macro was impossible.
Well, the thought popped in my mind again, and I came across this interesting tip from John Walkenbach:
It shows how to use the Application.OnUndo method in Excel VBA. Well, that is a really interesting concept. And I want to start building something to that extent into some of my VBA macros, b/c I know there have been times when I said... "oh, you know what..." but it was too late.
But I have one thought or question about the idea. That is, what if the selected range puts such a huge amount of data into the "undo cache" that it ends up causing the system to crash when you try to undo it? I would think that most of the time, it wouldn't be so big, but what are the possibilities?
Are there any known upper limits where it would be best to just return a message that says something like, "WARNING: This Action cannot be undone," similar to an Access Database with deleting large numbers of records at the same time?
Thanks for any thoughts or suggestions.
Well, the thought popped in my mind again, and I came across this interesting tip from John Walkenbach:
It shows how to use the Application.OnUndo method in Excel VBA. Well, that is a really interesting concept. And I want to start building something to that extent into some of my VBA macros, b/c I know there have been times when I said... "oh, you know what..." but it was too late.
But I have one thought or question about the idea. That is, what if the selected range puts such a huge amount of data into the "undo cache" that it ends up causing the system to crash when you try to undo it? I would think that most of the time, it wouldn't be so big, but what are the possibilities?
Are there any known upper limits where it would be best to just return a message that says something like, "WARNING: This Action cannot be undone," similar to an Access Database with deleting large numbers of records at the same time?
Thanks for any thoughts or suggestions.