ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Undo Button Click change (https://www.excelbanter.com/excel-discussion-misc-queries/34918-undo-button-click-change.html)

Kiran

Undo Button Click change
 
I have a Sort button on my worksheet which sorts a range od data
alphabetically. On clicking the sort it sorts the data, But if I try to undo
that change it does not work, Ctrl+Z is disabled.
Can anyone let me know (VBA code if needed) how I can take care of this?

Thnx

FSt1

hi,
Excel has a lot of built in niceities, the undo is one of them. but they
only work when doing things manually. macro code bypasses all the built in
niceities.
You can not undo anything done with macro code. If you want to undo your
sort, then you will have to write code that will resort your data. maybe
another button.

Good luck
FSt1

"Kiran" wrote:

I have a Sort button on my worksheet which sorts a range od data
alphabetically. On clicking the sort it sorts the data, But if I try to undo
that change it does not work, Ctrl+Z is disabled.
Can anyone let me know (VBA code if needed) how I can take care of this?

Thnx


Dave Peterson

If you want your macro to have an undo, you have to take care of it yourself.

John Walkenbach has some tips at:
http://j-walk.com/ss/excel/tips/tip23.htm



Kiran wrote:

I have a Sort button on my worksheet which sorts a range od data
alphabetically. On clicking the sort it sorts the data, But if I try to undo
that change it does not work, Ctrl+Z is disabled.
Can anyone let me know (VBA code if needed) how I can take care of this?

Thnx


--

Dave Peterson


All times are GMT +1. The time now is 02:26 PM.

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