A discussion about the Undo-stack in Excel

Joined
Oct 25, 2005
Messages
1
Reaction score
0
Hi,

I have read some threads and see that the undo-stack is a big pain to most programmers.

I though I create a Thread whereby the Idea of controlling the "undo-stack" in Excel can be discussed and might spawn of a development activity worth persuing.

Now if any of the following is not possible in the first place, than I appologize for waisting the developers time on this article.

The flaws of excel regarding the undo-stack are as follows (only some listed as to relevance to topic):
- It get's cleared as soon as a macro amends the Sheet.
- It can not be preserved before a macro is executed.
- It will not record anything the macro does.

Now my question goes to the C++ programers.

I know my VBA and VB/VB.NET but also know about addresses in memory and pointers in C++.

(Excuse my lack of technical terminollogy as I'm only new to windows development with C++)

What I'm trying to get at is, that if an object exists, like the undo-stack, it must be keeping it's data somwhere in memory, right ?

In my experience in learning Windows Game developing I noticed that when ever a message is fired off in Windows the winMain function picks it up and the Message is filtered into the Hi/Lo WORD setting of the params.

Now, can there be an app written in C++, like for a game, that intercepts messages aimed at other applications, and if so can it not be possible than to detect excel's undo/redo actions and therefore beeing able to see its object structure.
Furthermore if you can intercept the message can you not therefore locate the address in memory the undo-stack stores it's details in and reference it ?

If such code can be written is it not than possible to include that code as a DLL or similar into your macro VBA app in excel and therefor you are able to control the stack, copy it, define it and write/remove entries into/from it ?

There must be some way of exposing the undo-stack object as well as instanciating it through C++.

Anybody with any experience in trapping messages from other apps could you please write a small trail of though what could be done hypothetically to eventually get enough approaches to start developing such a tool.

Kind Regards,
Francois Wahl
 
Back
Top