6/19/2023 0 Comments Shortcut for redo in excelFor these reasons, I normally remove the Redo button from my Quick Access toolbar, but let us keep Undo, Redo, and Repeat for now. As we will learn, there is no way to program the Redo button in VBA only the Undo and Repeat buttons offer that feature. In fact the Repeat button frequently “becomes” the Redo button, including sharing its icon. Now before you ask, why do Redo and Repeat share the same keyboard shortcut (Ctrl+Y)? I wish I knew. In this tutorial, we’re going to incrementally develop a series of macros to demonstrate this behavior. But did you know you can program the behavior of the Undo and Repeat buttons using VBA? If done carefully, this lets you simulate undoing a macro after it was executed. You might subsequently notice the Repeat button (also Ctrl+Y) repeats the Excel macro that was recently run. You might have noticed the Undo (Ctrl+Z) and Redo (Ctrl+Y) buttons usually lose their previous “stack” of choices whenever you run an Excel macro. (The Back button can be ignored for the remainder.) The screenshot includes my Custom ribbon, where I have duplicated these four buttons for better illustration of this discussion. Here is a screenshot of my Quick Access toolbar, where I have added the Back button to the left of Undo and the Repeat button to the right of Redo. For example, Macabacus cannot undo row/column insertion/deletion.If you have not modified Excel’s Quick Access toolbar, it probably includes the Undo and Redo buttons. As a result, you may experience differences between Macabacus' Undo/Redo functionality and native Undo/Redo functionality. Macabacus' Undo/Redo solution is not perfect due to limitations of Excel's development environment. Select which formatting properties you want Macabacus to undo/redo (deselecting properties may improve performance), or disable Macabacus' Undo/Redo capability altogether. You can set the maximum number of cells for which Macabacus Undo/Redo is available-however, too many cells may slow performance. Macabacus' Undo/Redo options can be set in the Excel > Undo / Redo section of the Settings dialog (see below). Macabacus' Undo/Redo is designed to work seamlessly in the background, and uses the native Excel shortcuts, Ctrl+Z and Ctrl+Y, and Quick Access Toolbar buttons to trigger Undo/Redo operations. Accordingly, very few add-ins have achieved this advanced capability. Why don't all Excel add-ins do this? Because managing custom Undo/Redo stacks is prohibitively complex and expensive for most applications. So, we built our own Undo/Redo stacks to track changes made to spreadsheets, restoring most of this lost functionality. We believe customers of our enterprise-grade solutions shouldn't sacrifice anything to use our tools. In other words, the benefits provided by add-ins and macros outweigh the cost of losing native Undo/Redo capability. There are no easy workarounds to this problem, unfortunately.Įxcel add-ins and their users accept this loss of Undo/Redo functionality as a cost of doing business. This is a severe limitation of Excel, and not a problem with the add-in or macro. So, when you modify a formula and then run a macro to change number format, for example, you are unable to use Excel's native Undo to revert to the original formula. The execution of any code that makes a change to a spreadsheet destroys Excel's Undo/Redo stacks.
0 Comments
Leave a Reply. |