LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Cancel a macro already applied to all sheets

You can tell excel what macro to use when the user hits the undo button.

That's what this line does:
Application.OnUndo "Undo the ZeroRange macro", "UndoZero"
(from John's sample code)



Rayo K wrote:

Can you "tell" Excel to execute the undo code when the user clicks "Undo" or
does it ahve to be a separately executed macro?

"Dave Peterson" wrote:

You have to keep track of the stuff you did and the stuff you want to be able to
undo.

But macros can do lots that can't be undone. If you delete a file (not move to
the recycle bin), if you format a disk, ....

John Walkenbach explains it in his power programming books.

And he shares that info (for free) at:
http://www.j-walk.com/ss/excel/tips/tip23.htm

Debra Dalgleish has a list of books at her site:
http://www.contextures.com/xlbooks.html
(including John's)


Rayo K wrote:

I've been trying to program an "undo" into a macro I wrote and I am having
trouble finding the resources. Is there an "undo" class/method or do I have
to manually create an undo rountine.

"Dave Peterson" wrote:

Unless the macro has an undo programmed into it (and most don't), you can close
the workbook without saving and then reopen.

You'll lose any changes since the last save--including what the macro did.

minrufeng wrote:

I found that I can not undo my macro operation by just clicking a
button. Does anyone know how to cancel a macro action which is taken?

--
minrufeng
------------------------------------------------------------------------
minrufeng's Profile: http://www.excelforum.com/member.php...o&userid=26208
View this thread: http://www.excelforum.com/showthread...hreadid=515038

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson
 
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
macro to find cell content in sheets and make sheet active Nigel Excel Discussion (Misc queries) 4 June 26th 14 02:38 PM
macro for new sheets Raza Excel Worksheet Functions 2 November 8th 05 06:10 PM
calc locks up after running a macro that moves sheets to a new fil shibao Excel Discussion (Misc queries) 0 November 7th 05 10:58 PM
Date macro Hiking Excel Discussion (Misc queries) 9 February 3rd 05 12:40 AM
Macro for moving sheets minhao Excel Discussion (Misc queries) 3 December 10th 04 08:09 AM


All times are GMT +1. The time now is 11:14 PM.

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

About Us

"It's about Microsoft Excel"