Undo with custom Paste function

R

R Avery

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.
 
T

Tom Ogilvy

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top