Funny thing about <Ctrl> Z

BMD

Board Regular
Joined
Oct 5, 2005
Messages
211
It quit working. If I make a change to the sheet and wish to undo it I just hit Ctrl Z, but it quit working. How do I turn it back on?
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Von Pookie

MrExcel MVP
Joined
Feb 17, 2002
Messages
13,686
Do you have a macro making the change on the sheet? Or a Worksheet_Change macro that runs on that sheet?

You can't undo anything directly after a macro runs.
 

BMD

Board Regular
Joined
Oct 5, 2005
Messages
211
I did not know I have two macros, one on ThisWorkbook Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
and one on sheet 17
Sub Worksheet_Change(ByVal Target As Excel.Range)
 

Von Pookie

MrExcel MVP
Joined
Feb 17, 2002
Messages
13,686
Yep, that would do it, depending on how the macros are coded.

Workbook_SheetChange will run whenever a change is made on any sheet in the workbook unless specified within the macro code.

So when you make a change on the sheet, that macro triggers and wipes out any chance you had of undoing anything up until that point.

I think this only happens with macros that are affecting the sheets in some way, though. For example, if I run a macro that does nothing but display a message box, I am still able to use 'undo'. But if I run a macro that puts a value in cell A1, the undo arrow becomes grayed out.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,546
Messages
5,838,029
Members
430,526
Latest member
NiceGuyWithExcel2007

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top