ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Undo with custom Paste function (https://www.excelbanter.com/excel-programming/296321-undo-custom-paste-function.html)

R Avery

Undo with custom Paste function
 
I often copy data from Access, and paste into Excel. THe problem is
that the cells are always auto-set to WrapText=TRUE. Fixing that is
very tedious, even though it is only a few key strokes. Same with
auto-fitting the columns.

Therefore, I have made a custom Paste function that will do these steps,
and I have bound it to CTRL-v, so that the action is transparent to
me. The problem is that I can no longer undo the paste operation. Is
there anyway around this? Anyway to make Excel's to undo the paste (and
ignore the subsequent operations on wraptext and column autofit)?

Any help would be most appreciated.

Tom Ogilvy

Undo with custom Paste function
 
You would have to store all the necessary information to restore the
original state. The build in Undo generally does not work for changes made
through a macro. There is no way around that using built in capabilities -
as stated, you need to write your own procedures to manage storing and
restoring the information.

--
Regards,
Tom Ogilvy

"R Avery" wrote in message
...
I often copy data from Access, and paste into Excel. THe problem is
that the cells are always auto-set to WrapText=TRUE. Fixing that is
very tedious, even though it is only a few key strokes. Same with
auto-fitting the columns.

Therefore, I have made a custom Paste function that will do these steps,
and I have bound it to CTRL-v, so that the action is transparent to
me. The problem is that I can no longer undo the paste operation. Is
there anyway around this? Anyway to make Excel's to undo the paste (and
ignore the subsequent operations on wraptext and column autofit)?

Any help would be most appreciated.





All times are GMT +1. The time now is 08:15 AM.

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