PC Review


Reply
Thread Tools Rate Thread

About Application.OnUndo again

 
 
pk
Guest
Posts: n/a
 
      25th Jun 2008
Hi there,

I've found that calling Application.OnUndo method clears all the Undo
history, so this method appears unuseful. Maybe there is a way to keep the
history and use Application.OnUndo method only to place custom Undo method on
the top of the Undo stack?
More over if I call Application.OnUndo in OnUndo handler, it doesn't place
new handler on the stack.
 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      25th Jun 2008
Most macros that do anything destroy the undo/redo stack (along with the
clipboard).

If you want to control an undo, maybe you can take care of it yourself.

Check out John Walkenbach's site:
http://www.j-walk.com/ss/excel/tips/tip23.htm

pk wrote:
>
> Hi there,
>
> I've found that calling Application.OnUndo method clears all the Undo
> history, so this method appears unuseful. Maybe there is a way to keep the
> history and use Application.OnUndo method only to place custom Undo method on
> the top of the Undo stack?
> More over if I call Application.OnUndo in OnUndo handler, it doesn't place
> new handler on the stack.


--

Dave Peterson
 
Reply With Quote
 
pk
Guest
Posts: n/a
 
      25th Jun 2008
The example only demonstrates using Application.OnUndo method, nothing more.
I would like to use custom undo handlers only for my methods, something like
this:

StartTrackingChanges();
RunOperation();
FinishTrackingChanges();
Application.OnUndo(undoComment, "UndoOperationChanges");

Otherwise I'll have to fully implement my own undo/redo functionality, and
don't use Application.OnUndo at all.

"Dave Peterson" wrote:

> Most macros that do anything destroy the undo/redo stack (along with the
> clipboard).
>
> If you want to control an undo, maybe you can take care of it yourself.
>
> Check out John Walkenbach's site:
> http://www.j-walk.com/ss/excel/tips/tip23.htm
>
> pk wrote:
> >
> > Hi there,
> >
> > I've found that calling Application.OnUndo method clears all the Undo
> > history, so this method appears unuseful. Maybe there is a way to keep the
> > history and use Application.OnUndo method only to place custom Undo method on
> > the top of the Undo stack?
> > More over if I call Application.OnUndo in OnUndo handler, it doesn't place
> > new handler on the stack.

>
> --
>
> Dave Peterson
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
appdata-local-Application Data-Application Data-Application Data infinitum ad nauseum. WHY keepout@yahoo.com.invalid Windows Vista General Discussion 15 16th Sep 2007 01:50 AM
Fail in operating my hardware in web application , makes other windows application startup failure. Ryan.ZhYin Microsoft C# .NET 0 25th Jan 2005 08:34 AM
Making more memory available to application?Im making a memory intense application, the application is supposed to open a prettylarge image (about 9200*10200 in 300Dpi) yosh@liquidzone.net Microsoft Dot NET Framework Forms 0 6th Dec 2004 07:16 PM
OnUndo info@guckel.com Microsoft Excel Programming 1 1st Nov 2004 01:46 AM
Re: Application.OnUndo Questions - Loses Prior Undo's and Runs 1x Tom Ogilvy Microsoft Excel Programming 0 27th Aug 2003 01:26 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:05 PM.