Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Editing worksheet data from VBA clears UNDO buffer

Status
Not open for further replies.

krinid

Programmer
Jun 10, 2003
356
CA
Why is it that changing data on a worksheet from VBA clears the Undo buffer ? Is there a way around it?

(in my case, when invalid data is entered into a sheet, it's highlighted red via the Worksheet_Change event; but after altering the sheet, nothing can be undone)
 
My undocumented but long-held suspicion is that the Undo-buffer isn't capable of keeping track of what is done by VBA, and so must just clear the buffer and start over. For all it knows, you might have done something via code that makes it impossible to undo the last pre-code-execution user action.

VBAjedi [swords]
 
I had such a suspicion, but I thought I'd ask in case anyone knew a way to get around it. It's quite frustrating, really, b/c undo becomes completely unavailable. oh well. The nature of the beast, I suppose.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top