+ Reply to Thread
Results 1 to 5 of 5

VBA code disables "UNDO" function on spreadsheet

  1. #1
    Registered User
    Join Date
    09-16-2013
    Location
    Kansas, U.S.
    MS-Off Ver
    Excel 2007
    Posts
    17

    VBA code disables "UNDO" function on spreadsheet

    This code is running in the "code module" for a specific worksheet.

    Problem: Something in the code disables the worksheet UNDO feature for the entire worksheet.
    The worksheet name is "Alerts".

    Is this normal or can I modify the code somehow to regain access to UNDO?

    thanks,
    Dustin



    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: VBA code disables "UNDO" function on spreadsheet

    You cannot use undo to undo the affects of a Macro.

    Save your data before you run the macro.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    09-16-2013
    Location
    Kansas, U.S.
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: VBA code disables "UNDO" function on spreadsheet

    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    Last edited by toolman_dustin; 04-06-2015 at 12:10 PM.

  4. #4
    Registered User
    Join Date
    09-16-2013
    Location
    Kansas, U.S.
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: VBA code disables "UNDO" function on spreadsheet

    mehmetcik,

    thanks for the reply. I know I can't undo the affects of the macro, however, the entire spreadsheet "undo" feature is disabled. The Macro only addresses column's E, W & X.

    Undo for all other columns are disabled. Is this a normal byproduct of the ByVal command?

    thanks.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,496

    Re: VBA code disables "UNDO" function on spreadsheet

    Is this a normal byproduct of the ByVal command?
    No, it's just what happens when you run a macro. It "kills" the undo stack. I guess the theory is/was that a macro can make hundreds, if not thousands, of changes, and it is unrealistic to expect that you can undo the effect of a macro.

    Can't quite see why you are using a Change event handler for what is, essentially, Conditional Formatting ... which wouldn't give you the issue.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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. Track Changes ( Makes "Undo/Redo" Function Unavailable - Any VBA to Re-Add it?)
    By karimel_romeo in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-29-2013, 12:22 PM
  2. Replies: 11
    Last Post: 05-17-2013, 06:24 AM
  3. Code for Inventory spreadsheet to add/subtract "on hand" amounts
    By DKS in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-28-2011, 02:49 PM
  4. Excel 2007 : two "undo" function irritants
    By TWDC in forum Excel General
    Replies: 3
    Last Post: 04-11-2011, 08:43 AM
  5. VB Code causes "undo" to stop functioning
    By Rory Murphy in forum Excel General
    Replies: 4
    Last Post: 04-07-2010, 11:28 AM

Tags for this Thread

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