+ Reply to Thread
Results 1 to 3 of 3

Redo a macro run

  1. #1
    Forum Contributor
    Join Date
    11-01-2018
    Location
    England
    MS-Off Ver
    2016
    Posts
    280

    Redo a macro run

    Hi All,
    I know you can't redo results that are changed by the macro using CTRL + Z. But is it possible to create a macro to revert the changes to its previous result?

    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: Redo a macro run

    Good morning Eduards

    It really depends what your macro does - you can write a module that will place the values of changed cells into an array to reinstate that data.

    Jan Karel Pieterse has an article on his site discussing a pretty much generic VBA undo routine which you should be able to drop into your project relatively easily. There is also a downloadable example file.

    https://www.jkp-ads.com/Articles/UndoWithVBA00.asp

    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  3. #3
    Forum Contributor
    Join Date
    11-01-2018
    Location
    England
    MS-Off Ver
    2016
    Posts
    280

    Re: Redo a macro run

    Thank you Dominic!

+ 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: 29
    Last Post: 10-03-2019, 10:37 AM
  2. Workbook_SheetChange macro deletes all "undo" ("redo") states
    By jakopak in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-16-2017, 04:24 PM
  3. [SOLVED] Need Undo/Redo on QAT
    By KiwiRickToo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-05-2016, 05:19 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: 4
    Last Post: 06-21-2012, 02:44 AM
  6. [SOLVED] Macro to redo date/time formats
    By beng404 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-04-2012, 09:12 AM
  7. Unod/Redo
    By tofer11 in forum Excel General
    Replies: 13
    Last Post: 05-03-2007, 09:04 PM

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