+ Reply to Thread
Results 1 to 3 of 3

how to undo actions performed by addin

  1. #1
    Registered User
    Join Date
    02-08-2016
    Location
    Maharashtra
    MS-Off Ver
    Office 2010
    Posts
    11

    Question how to undo actions performed by addin

    Hello, im new in excel vba, i want to know how to performed an undo action if addin is exceuted.....

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,920

    Re: how to undo actions performed by addin

    Actions taken through VBA cannot be undone. Unlike in native Excel, there is no undo functionality.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,844

    Re: how to undo actions performed by addin

    Technically, you can undo the actions of a VBA procedure using the application.onundo method: https://msdn.microsoft.com/EN-US/lib.../ff194135.aspx . It looks basically like this:

    1) Your main procedure must store any information needed by the undo procedure.
    2) Put the application.onundo at the end of the main procedure.
    3) Write and debug the undo procedure that will undo whatever you want undone.

    Excel's undo stack still gets cleared when the main procedure is run, but you can undo what the main procedure did.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

+ 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. [SOLVED] Loss of Undo from .NET Addin
    By Peter in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 01-01-2019, 07:22 AM
  2. How to have a undo last actions button on vba userform in excel
    By yoursamrit2000 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-29-2014, 02:53 PM
  3. How to have a undo last actions button on vba userform in excel
    By yoursamrit2000 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-29-2014, 11:49 AM
  4. Replies: 0
    Last Post: 11-22-2014, 05:02 PM
  5. [SOLVED] Undo Macro actions
    By rskfriends in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-18-2014, 02:51 AM
  6. Replies: 0
    Last Post: 02-29-2012, 01:40 PM
  7. Mimic Undo actions
    By Chris W. in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-21-2005, 11:06 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