+ Reply to Thread
Results 1 to 3 of 3

Enable Undo after Macro has Run

  1. #1
    Forum Contributor
    Join Date
    06-21-2010
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    1,211

    Enable Undo after Macro has Run

    I'm using the following code (kindly provided by quekbc) but I've just realised that running the code results in the blue 'Undo' arrow being greyed out preventing people Undoing their last action. Is there a way amend the code to keep 'Undo' enabled.

    Please Login or Register  to view this content.
    Many thanks

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Re: Enable Undo after Macro has Run

    Good afternoon Hangman

    As you've just found out, a side effect of VBA is that every time your routine runs, your undo stack will be cleared. The only simple way to deal with this is not have the event running from a selection change, as the routine is then constantly running.

    However, as this is a well known issue, greater minds than mine have wrestled with a solution. A very clever and elegant "one size fits all type" solution is available here.

    The only problem is, it's not really for beginners, involving class routines and the like, but it is well explained.

    HTH

    DominicB

  3. #3
    Forum Contributor
    Join Date
    06-21-2010
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    1,211

    Re: Enable Undo after Macro has Run

    Um, Thanks Dominicb,

    This seems like such a basic requirement, but appreciate it is a well known issue. So that means no quick fix then right? I'll take a look at your link, but I really am a VBA novice, so unsure how much sense it will make...

    Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 11-22-2014, 05:02 PM
  2. Replies: 0
    Last Post: 02-29-2012, 01:40 PM
  3. Replies: 8
    Last Post: 11-07-2011, 04:41 PM
  4. Undo function to undo Visual Basic commands
    By pierre08 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-15-2010, 04:59 AM
  5. Macro for undo
    By prabodh1234 in forum Excel General
    Replies: 3
    Last Post: 07-09-2009, 11:10 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1