Results 1 to 9 of 9

Thread: "Undo" feature

  1. #1
    4 Star Lounger
    Join Date
    Oct 2005
    Posts
    599
    Thanks
    1
    Thanked 1 Time in 1 Post
    Hi loungers...Help !!.......the 'undo' feature isn't working...the worksheet is protected, but even in cells that aren't protected, the Undo feature doesn't 'work' (doesn't even show up for work...).....any ideas? Thanks.

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts
    Is there any code in it?
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    4 Star Lounger
    Join Date
    Oct 2005
    Posts
    599
    Thanks
    1
    Thanked 1 Time in 1 Post
    The cells in question are unprotected; there is no code, per se, in the cells, but there is conditional formatting attached to the cells....and there is data validation (lists) for the cells.....

  4. #4
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts
    What do you mean by 'no code per se'? There's either code or there isn't surely? (You can't have code in cells, so I am referring to event code)
    Regards,
    Rory

    Microsoft MVP - Excel

  5. #5
    4 Star Lounger
    Join Date
    Oct 2005
    Posts
    599
    Thanks
    1
    Thanked 1 Time in 1 Post
    ahh...yes...there is change event code in these cells...sorry

  6. #6
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts
    When a macro is run the UNDO stack is cleared. Thus worksheet change code effectively disables UNDO.

    If you want a change event and the UNDO, you must create your own undo routine to monitor what the code does. http://excel.tips.net/Pages/T002060_...Undo_List.html has some ideas and suggestions...

    Steve


  7. #7
    4 Star Lounger
    Join Date
    Oct 2005
    Posts
    599
    Thanks
    1
    Thanked 1 Time in 1 Post
    .hhhhmmm...Thanks Steve....I might have to approach this differently b/c I don't know enough about VBA to create my own undo routine to monitor what the code does.

  8. #8
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts
    The simplest thing for undo, would is the suggestion in the link: save a copy of the worksheet BEFORE changes from the macro are made, and then the undo is to just open up the saved copy...

    If you wanted multiple levels you would have to save multiple copies and have some routine to delete them when they are no longer required...

    Steve

  9. #9
    4 Star Lounger
    Join Date
    Oct 2005
    Posts
    599
    Thanks
    1
    Thanked 1 Time in 1 Post
    Hi Steve....I pretty much thought that might be the case....the code is a 'change event' code (to add additional formatting), so it seems to me that with each change, the code runs and wipes out anything that is 'stacked' (??).....I can get by with eliminating the code, b/c the data is all re-produced elsewhere in the wbook with the formatting intact,...but thank you very much for your help...and as always, with this lounge, I learn something new all the time...)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •