VBA: Undo Last Action

SteveOranjin

Board Regular
Joined
Dec 18, 2017
Messages
170
Hello,

Hope you are all well. I love my Macro's, they're great. From time to time though, I run one of my macros and something happens that I didn't anticipate. Normally, when such a thing happens I can hit the key command Control + Z and then boom! I can undo the last action that I've done. I've noticed however, that when I run one of my macros this is not the case. My guess is, that when a macro runs, it clears the RAM and or some other type of memory where my last action was stored. Is there a way for me to write something into some of my macros so this does NOT happen? If so, can someone walk me through that?

Hope you are well,

Steve
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
You would have to have written code that reverses the action. Once VBA is run, there is no reversibility action within Excel for VBA. I always make sure to have a saved copy that I can revert to before running any VBA.
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,186
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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