ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Undo Command Button Actions (https://www.excelbanter.com/excel-programming/372517-undo-command-button-actions.html)

Rob

Undo Command Button Actions
 
If I copy and paste cells within any given spreadsheet i can undo it by using
the undo button. But if I assign the same copy/paste routine to a command
button I don't get the chance to use the undo function.

How do I fix this? I have a series of command buttons that perform a wide
range of common tasks and procedures but I don't get the chance to undo them
if i click the wrong button by accident.

Ummm.... Help? Maybe?

Thanks in advance,
Rob

Nigel

Undo Command Button Actions
 
What you experience is also true for VBA code. You need to create an Undo
Handler - but be warned this is not a trivial application.

To get some insight have a look here.....

http://www.jkp-ads.com/Articles/UndoWithVBA01.asp


--
Cheers
Nigel



"Rob" wrote in message
...
If I copy and paste cells within any given spreadsheet i can undo it by
using
the undo button. But if I assign the same copy/paste routine to a command
button I don't get the chance to use the undo function.

How do I fix this? I have a series of command buttons that perform a wide
range of common tasks and procedures but I don't get the chance to undo
them
if i click the wrong button by accident.

Ummm.... Help? Maybe?

Thanks in advance,
Rob





All times are GMT +1. The time now is 03:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com