Looking for insight on undo macro run in error

tobyz95

Board Regular
Joined
Jul 28, 2012
Messages
187
Hi ALL, I am looking for some insight on this situation:

I accidently ran a macro I created that copies a new template over the active worksheet..OOPS!

normally/previously I just close without saving..no big deal

this time Excel(2013) doesn't close, and I get the message "Picture too large and will/may be truncated"

can't get rid of it so I have to click "ok", and Excel closes

PROBLEM=when I opened Excel again, it maintained the macro run in error, and I lost the worksheet I had been working on

???? So I went looking for answers on how to "undo a macro run in error" and found two solutions:

1. Close without saving (which I have used previously without problems)
2. Application.OnUndo "Primary Macro", "UndoPrimary" from Alan Wyatt's Excel Tips found here

So now I have a question (of course) Am I suppose to add this to every macro in case I hit it by accident, or maybe just to certain macros, and if so which ones?

As always, any info is greatly appreciated!
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

Forum statistics

Threads
1,203,269
Messages
6,054,482
Members
444,727
Latest member
Mayank Sharma

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
Back
Top