+ Reply to Thread
Results 1 to 3 of 3

Undo Not Working When Delete Is Used

  1. #1
    Forum Contributor swordswinger710's Avatar
    Join Date
    02-20-2008
    Location
    Bright, Canada
    MS-Off Ver
    2010
    Posts
    845

    Undo Not Working When Delete Is Used

    I have a workbook which automatically populates cells C8 and C12 on the Entry Page sheet with values taken from the filename. It is supposed to prevent users from making changes to these two cells, and it works almost perfectly apart from when a user selects cell C8 and hits delete. My custom error message appears as it should, but then the cell is supposed to revert to it's previous value, and that's not happening.

    I've been trying to figure out why exactly that is, since C12 has no issues undoing deletions. This is the section of the code in which the Undo is not functioning for C8 when the Delete key is used to clear it:

    Please Login or Register  to view this content.
    I've attached my sample workbook to hopefully help narrow this problem down. Thank you!
    Attached Files Attached Files
    There is so much good in the worst of us,
    And so much bad in the best of us,
    That it hardly behooves any of us
    To talk about the rest of us.

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Undo Not Working When Delete Is Used

    When you delete C8, then this section of code is firing, which 'overwrites' the last step, to be undone:
    Please Login or Register  to view this content.
    The simplest fix is to move the section of code handling C8 and C12 above that section of the module - so the module would look like this:

    Please Login or Register  to view this content.
    Make sense?
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Forum Contributor swordswinger710's Avatar
    Join Date
    02-20-2008
    Location
    Bright, Canada
    MS-Off Ver
    2010
    Posts
    845

    Re: Undo Not Working When Delete Is Used

    Dude, that fixed it! Way too easy, thank you!

+ 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. undo not working
    By davidx in forum Excel General
    Replies: 1
    Last Post: 11-12-2013, 12:45 PM
  3. VBA to delete value pending on another cell using if function and undo
    By Rocky2013 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-27-2013, 07:55 PM
  4. Need some help on keeping UNDO/REDO working after running macro's. Almost there ;-)
    By onidarbe in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-12-2013, 02:00 PM
  5. Replies: 0
    Last Post: 02-29-2012, 01:40 PM
  6. 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
  7. [SOLVED] undo delete
    By enyaw in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-09-2006, 04:55 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