Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Undo Menu not active during Macro - any ideas.

Status
Not open for further replies.

Cresby

Programmer
Aug 15, 2002
287
GB
I tried an Auto archive loop but the undo stack appears to be empty all the time. Code something like -

Sub blahblah
do
if timer-lasttime <300 then
ActiveWorkbook.Save
lasttime = timer
endif
do events
loop while 1<>2

end sub

I'm sure someone is going to tell me there is an auto archive lurking but where?

my next try will be a cell click event (and count + threshold) to trigger a save.

I run a slow system with Norton and Zonealarm (both switched off at the time) and power save on the HDD's. Occasionally a double click on cells crashes Excel (usually when I have an hours work unsaved - I know, stupid but when you are on a roll..........)
It affects the TV (All-in-Wonder Pro) or something else does. It is just at the limit of bearing with it, so if I can solve this auto archive trick and keep the undo stack.............
 
Anytime you save, the undo stack is emptied. This happens outside of code as well. I guess they figure if you save it, they don't need to let you undo it.

 
Hi Cresby,

As you suspected, there is an AutoSave Addin which comes with Excel 97 and 2K. Install it from Tools > Add-Ins..., and then tailor it via Tools > AutoSave.... Unfortunately that, too, clears the Undo stack. Basically if you save, you are assumed not to want to undo and I don't know any way round it.

Enjoy,
Tony
 
Thanx folks. But the undo stack seems to be clear before any saves take place not after - will go check. What I did find was a activesheet_change event that seems to serve much better. However Add-ins here I come.
I would rather loose undo every 20 taps than lose the last hour's work. Still it did mean I had to re-do and re-check at least three times (but less lost eacvh time). It doesn't matter how many tomes you have it happen when you are on a roll and concentrating hard .............

All this for a few English square dances. Yes of course we have them - where do you think they originated? Probably in France with yer allemendes and dosi-dos.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top