#1   Report Post  
Posted to microsoft.public.excel.programming
Rob Rob is offline
external usenet poster
 
Posts: 718
Default Undo list

I've just discovered the Application.OnUndo command, and written an undo
procedure for my macro. Is there a way to not have the existing stack of
undo commands cleared when code runs. ie: If there are already some items
in the Undo list, I'd like my undo procedure added to the list rather than it
replacing whatever's there.
Thanks
Rob

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Undo list

Many macro commands (probably most) clear the undo stack - probably any that
would affect the ability of excel to undo. In general, Undo will not undo
changes made by macros.

--
Regards,
Tom Ogilvy

"Rob" wrote in message
...
I've just discovered the Application.OnUndo command, and written an undo
procedure for my macro. Is there a way to not have the existing stack of
undo commands cleared when code runs. ie: If there are already some

items
in the Undo list, I'd like my undo procedure added to the list rather than

it
replacing whatever's there.
Thanks
Rob



  #3   Report Post  
Posted to microsoft.public.excel.programming
Rob Rob is offline
external usenet poster
 
Posts: 718
Default Undo list

Thank you Tom.
....but everything I'm dealing with here is Undo-able: I've got the undo
command to work with with my macro, and the actions that were in my undo
stack before I ran "PerformSomeActions" must also be Undo-able, so surely
there must be a way to leave those items in the undo stack. Is it posible to
directly manipulate the Undo stack for example??

sub PerformSomeActions
'code to store some info about the initial state
'code to perform the actions
application.onundo "Undo the Actions", "UndoProcedure"
end sub
sub UndoProcedure
'code to restore initial state
end sub


"Tom Ogilvy" wrote:

Many macro commands (probably most) clear the undo stack - probably any that
would affect the ability of excel to undo. In general, Undo will not undo
changes made by macros.

--
Regards,
Tom Ogilvy

"Rob" wrote in message
...
I've just discovered the Application.OnUndo command, and written an undo
procedure for my macro. Is there a way to not have the existing stack of
undo commands cleared when code runs. ie: If there are already some

items
in the Undo list, I'd like my undo procedure added to the list rather than

it
replacing whatever's there.
Thanks
Rob




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Undo list

so surely
there must be a way to leave those items in the undo stack.


I would guess not, particularly if you use onUndo


Is it posible to
directly manipulate the Undo stack for example??

Not that I am aware of.

--
Regards,
Tom Ogilvy


"Rob" wrote in message
...
Thank you Tom.
...but everything I'm dealing with here is Undo-able: I've got the undo
command to work with with my macro, and the actions that were in my undo
stack before I ran "PerformSomeActions" must also be Undo-able, so surely
there must be a way to leave those items in the undo stack. Is it posible

to
directly manipulate the Undo stack for example??

sub PerformSomeActions
'code to store some info about the initial state
'code to perform the actions
application.onundo "Undo the Actions", "UndoProcedure"
end sub
sub UndoProcedure
'code to restore initial state
end sub


"Tom Ogilvy" wrote:

Many macro commands (probably most) clear the undo stack - probably any

that
would affect the ability of excel to undo. In general, Undo will not

undo
changes made by macros.

--
Regards,
Tom Ogilvy

"Rob" wrote in message
...
I've just discovered the Application.OnUndo command, and written an

undo
procedure for my macro. Is there a way to not have the existing stack

of
undo commands cleared when code runs. ie: If there are already some

items
in the Undo list, I'd like my undo procedure added to the list rather

than
it
replacing whatever's there.
Thanks
Rob






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I clear UNDO list? Duke Excel Worksheet Functions 1 March 2nd 09 05:01 PM
Named data validation list- how to undo? Roady Excel Discussion (Misc queries) 1 October 17th 08 04:41 PM
Excel 07 undo list Langhorne Excel Discussion (Misc queries) 0 April 1st 08 04:30 PM
Undo List J Sears Excel Discussion (Misc queries) 1 March 12th 07 05:34 PM
How do I undo a list I've created in Excel 2003? Zach Excel Worksheet Functions 1 April 27th 06 11:17 PM


All times are GMT +1. The time now is 06:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"