How? If you create a procedure which just does Application.Undo, then type something into the worksheet and run the procedure, it Undoes. Compare Excel | Excel Templates | DownloaderXL Pro Finance Templates & Add-In Bundle | NeuroXL Predictor | Construction Estimating Merge Excel The Easy Way | Trading Add-ins For Excel If you have any questions regarding the content of this notice, please contact a member of the OzGrid Administration Team If this is your first visit, be sure to check out http://intrascol.org/excel-vba/excel-vba-application-volatile-not-working.html
I also read that MS Word has the UNDO function in it's VBA, but Excel is much more complicated than Word, just as you stated Xenou. Use a separate UNDO workbook as trying to create a copy of a worksheet in the same workbook is definitely problematic when using range names. I appreciate everyone's time for answering. There are a couple of ways that you can approach the problem, however.
Code: Private Sub Worksheet_Change(ByVal Target As Range) Undolist = Application.CommandBars("Standard").Controls("&Undo").List(1) On Error GoTo Whoa Application.EnableEvents = False CheckChanges Range("A20:A32") LetsContinue: Application.EnableEvents = True Application.ScreenUpdating = True Exit Sub Whoa: MsgBox Err.Description The last statement in the ZeroRange subroutine specifies the text to display in the Undo menu, and the subroutine to call if this command is selected. Float matrix left among other matrices Mimsy were the Borogoves - why is "mimsy" an adjective? The answer is yes.
Now my problem is, if I enter say 5 in > > F83, then the above code is triggered, and through the Else, Application > > Undo is triggered, and 3 Share Share this post on Digg Del.icio.us Technorati Twitter Reply With Quote Apr 22nd, 2011,09:53 AM #2 Ruddles Board Regular Join Date Aug 2010 Location Glevum Castra, Britannia Posts 5,518 Re: thx for any response! Undo Vba Code All rights reserved.
My question: Can this second trigger be avoided somehow? Excel Macro Undo Last Action I added the red line so it would save the undo list before execution. Dev Center Explore Why Office? It's been a few years since I've thought about this problem - I think as your programming skills increase you just become more adept at controlling program flow and you run
I was presuming that I already had the EnableEvents 'off', and still it was not working. Is there any plans to allow "undo" after vba code has been executed? Maurizio Our Company Sharon Parq Associates, Inc. Share Share this post on Digg Del.icio.us Technorati Twitter Using: Office 2007/Win7 (work) Office 2010/Win7 (home) You are rich in proportion to the number of things you can let alone. --
The time now is 10:43 AM. Author Bio Allen Wyatt With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. Excel Vba Undo After Macro Results 1 to 13 of 13 Thread: Undo after VB code executes Tweet Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Excel Vba Undo Stack Why is looping over find's output bad practice?
Unlike Word, changes made to an Excel workbook by using VBA cannot be undone easily. http://intrascol.org/excel-vba/excel-vba-beep-not-working.html What is the scope of the "undo" if I run a series of commands and subroutines? Then you run a VBA routine which does a whole load of things, one of which is to change cell A1 to 101. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Preserving the Undo List. Excel Vba Undo Cell Change
Thanks for all the help that you can offer me concerning, sincere greetings from a. He is president of Sharon Parq Associates, a computer and publishing services company. We are here to make you awesome in Excel. this content Sids explanation seems doable, in theory I understand it http://www.projekts.lv/ Reply With Quote Sep 18th, 2011,05:55 PM #12 westconn1 View Profile View Forum Posts PowerPoster Join Date Dec 2004 Posts 22,002
The time now is 00:43. In this article I will demonstrate how one can use two class modules to create a (more or less) generic undo handler which one can plug into any project. If you need to have it enabled then...
Ill try this code, maybe it will work on my maschine. Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next dim all variables as required I am using the below 2 statements to false and true: Code (vb): Application.ScreenUpdating = False Application.EnableEvents = False .... ... ... Last edited by Raivis; Sep 15th, 2011 at 01:31 PM.
On Tate's "Endomorphisms of Abelian Varieties over Finite Fields", sketch of proof of main result? Then you click Undo once. It would be good enough just to be able to undo things in excel that happened before the macro was executed. have a peek at these guys Select the range and execute the ZeroRange subroutine.
Subscribe Get tips like this every week in ExcelTips, a free productivity newsletter. Share Share this post on Digg Del.icio.us Technorati Twitter R. --- On two occasions I have been asked, 'Pray, Mr Babbage, if you put into the machine wrong figures, will the Excel Video Tutorials / Excel Dashboards Reports Reply With Quote November 28th, 2009 #4 Dave Hawley View Profile View Forum Posts Visit Homepage Administrator Join Date 24th January 2003 Location Australia Can spacecraft defend against antimatter weapons?
Friday, April 22, 2011 2:47 PM Reply | Quote Answers 0 Sign in to vote As you say the Undo stack is cleared when VBA code (or any other code) makes Not the answer you're looking for? Reason: better explanation Share Share this post on Digg Del.icio.us Technorati Twitter Reply With Quote Apr 22nd, 2011,10:13 AM #4 Ruddles Board Regular Join Date Aug 2010 Location Glevum Castra, Britannia Powered by vBulletin Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc.
Or at least it does here. Most people know that if they mess things up, they can quickly press Ctrl+Z or choose the Undo command from the Edit menu or by using the Undo tool on the Solve using Cauchy Schwarz Inequality Is there any point in ultra-high ISO for DSLR [not film]? By jjst34 in forum Excel General Replies: 2 Last Post: November 26th, 2003, 06:25 Bookmarks Bookmarks Digg del.icio.us StumbleUpon Google Posting Permissions You may not post new threads You may not
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next dim all variables as required Does anyone have anything to can offer about this? Your subroutine will need to store the previous state so it can be restored if the user choose the Edit Undo command. The time now is 11:43 AM.
Watch for that 32 character name limitation on worksheets. When changes are made directly in the Excel UI temporary snap shots are stored of changes which can be rolled back in reverse order required to the limit of Undos. And what if I changed cell(1,1) by mistake instead of cell(2,1), and I want to put it back to the original value? Reply With Quote Sep 11th, 2011,05:39 PM #5 westconn1 View Profile View Forum Posts PowerPoster Join Date Dec 2004 Posts 22,002 Re: Undo after VB code executes in excel (2000) the
Reply With Quote Sep 11th, 2011,11:33 AM #3 Raivis View Profile View Forum Posts Visit Homepage Thread Starter Addicted Member Join Date Jan 2008 Posts 250 Re: Undo after VB code In extreme cases, you might need to save an entire worksheet. I am curious to know if there is another way, and if so, How. All rights reserved.