Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6057181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:27:35+00:00 2026-05-23T08:27:35+00:00

I am considering implementing an Excel add-in using COM ( not VBA) that will

  • 0

I am considering implementing an Excel add-in using COM (not VBA) that will manipulate data in the worksheet.

I am going to need this add-in to seamlessly integrate with the Undo stack.
More specifically:

  1. Any changes this add-in makes to the data need to be undoable by the user (through the standard Undo action)
  2. The items on the Undo stack before the add-in action takes place need to be preserved

In my (albeit perfunctory) research so far, it is unclear whether or not Excel can allow for this. If it does not, this is a showstopper, and the add-in will have no value.

My question: is it possible? This is more of a “yes or no” question than a “how” question, as I need to know if I am embarking on a wild goose chase or not. However, any pointers on how it can be done would be a bonus.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T08:27:36+00:00Added an answer on May 23, 2026 at 8:27 am

    Seems like it is not possible after all.

    The Application.OnUndo method clears the current undo stack and places itself on top.
    There doesn’t seem to be anything else related to customizing undo.

    It is possible.

    Application.OnUndo registers an undo sub for the currently executing sub:

    sub ImMakingChanges()
      cells(1,1).interior.color = vbyellow
      application.onundo "Undo the stupid color", "RemoveMyStupidChanges"
    end sub
    
    sub RemoveMyStupidChanges()
      cells(1,1).interior.colorindex = xlnone
    end sub
    

    Obviously, saving a previous state in the wild is generally a nightmare. But here you go.

    Also, your undo sub will need to be visible to the general public so that Excel can find and call it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to database design and I considering implementing something that will be time
We're implementing a new solution in our classic ASP environment that's using COM interop
I'm working on a RPG using django and am considering different options for implementing
I'm considering implementing one or two JSR APIs. I have not yet read the
I need to detect when a program crashes or is not running using python
I am implementing an inserted trigger and am considering using ORIGINAL_LOGIN function to capture
Do applet javascript calls serialize in any proper way? I'm considering implementing a model
Considering this code, can I be absolutely sure that the finally block always executes,
I am implementing a C++ message queue based on a std::queue. As I need
I'm implementing an AVL binary tree data structure in C# .NET 2.0 (possibly moving

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.