View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default indicate a change in a row

John Walkenbach's site has "undo" code for reversing the effects of macro
changes but I think might be difficult to use on event code.

http://www.j-walk.com/ss/excel/tips/tip23.htm

Undoing a VBA Subroutine

Computer users have become accustomed to the ability to "undo" an operation.
Almost every operation you perform in Excel can be undone. If you program in
VBA, you may have wondered if it's possible to undo the effects of a subroutine.
The answer is yes. The qualified answer is it's not always easy.

Making the effects of your subroutines undoable isn't automatic. Your subroutine
will need to store the previous state so it can be restored if the user choose
the Edit Undo command. How you do this will vary, depending on what the
subroutine does. In extreme cases, you might need to save an entire worksheet.
If your subroutine modifies a range, for example, you need only save the
contents of that range.


Gord Dibben MS Excel MVP


On Wed, 3 Oct 2007 10:47:47 -0700, "Peo Sjoblom" wrote:

You can't undo macros. If you don't like what you get you need to exit from
excel without saving