Why Undo commandbutton is Cleared ?

  • Thread starter Thread starter halimnurikhwan
  • Start date Start date
H

halimnurikhwan

Hi all,

I have a problem if I use :

'>>>>>>>>>>>>>
sub cariorfind()
set findx = activesheet.cells.find(What:="words")
if not findx is nothing then msgbox findx.address
end sub
'>>>>>>>>>>>>>

the undo command lists is cleared after the procedure above,
so I can't undo my previous action... :(
anyone please help me to answer it ...!

Thank you very much..
regds,
Halim
 
Halim,


As far as I know, you cannot undo anything done via VBA code.

I may be wrong, but I have noticed this and it has never let me undo
anything I have done through code.

is there a specific action you wish to undo as you may be able to
achieve it with your code, like storing the previous settings and then
restoring after your code?

Duncan
 
Hi Duncan,

As far as I know that's not always but often,
and I think that code not change value in cells or
something that react undo lists...

rgds,
halim


Duncan menuliskan:
 
Hi Norman,
I've tried that way... but it seems only undo once ...
How to add the existing undo action lists ... ?
thanks,

hAlim



Norman Jones menuliskan:
 
Hi Halim,

Many macro instructions will destroy Excel's undo list. There is no way to
restore the undo list. If you wish to provide an undo facility for your
macro, you will need to add code to provide your own undo functionality.

In the suggested link, John Walkenbach demonstrates a simple undo strategy.
In his commercially available Power Utility Pak utility, John Walkenbach
provides more complex examples.

In short, however, if you require an undo functionality in your VBA
routines, invariably the onus will be on you to add code to provide such
functionality.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top