Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You will have to save the "before" configuration and then use that in your undo code.
John Walkenbach has an example here... http://spreadsheetpage.com/index.php...ba_subroutine/ Note also that the undo option should turn itself off at some point. My Special Sort add-in undo feature, for instance, saves a sampling of cell values from the post sort range and won't undo if those cells have changed . -- Jim Cone Portland, Oregon USA http://www.contextures.com/excel-sort-addin.html (editorial review of Special Sort add-in) "Fede Sauret" wrote in message ... Thanks Jim, yes, I did have to implement my own Undo function. But I couldn't find a workaround to keep using the old "undo stack", neither be able to memorize more than action to undo, since everytime the code I have is run, the whole stack is emptied. I know Excel empties the "undo stack" when certain things are done from VBA. But not every time, for example if we run a HelloWorld function as follows: Sub HelloWorld() MsgBox "Hello world" End Sub In this case undo stack will remain untouched, with all previous actions. That's why I thought that maybe I could emulate a call to the "fill in color" button that would not empty the stack and be memorized. Are you sure this is completely impossible? What about adding copies of the default fill-in button to a custom ribbon? I could change the icon, using a different color for each copy, and then try to run some code that would change the picked up color before the default "fill in button" code is run. Is this possible? How would I do it? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formatting cell backgrounds based on cell contains | Excel Programming | |||
funtions for colors for fonts or cell backgrounds? | Excel Worksheet Functions | |||
functions to change color of fonts or cell backgrounds? | Excel Programming | |||
Sum Formula to Exclude Certain Cell Values/Backgrounds | Excel Programming | |||
Undo change | Excel Programming |