Copy cell and paste in same column

G

Guest

Does anyone know if it is possible for a user to copy a cell or range of
cells from column and then paste in the same column? I want to prevent the
users from copying a cell then pasting into another column that is formatted
differently.

Any advise would be greatly appreciated!
 
T

Tom Ogilvy

I think you would have to use the selection change event to manage this.
Think through what actions would be required - storing the last selection,
determining if the user had the potential to paste, unprotecting the sheet
locking all cells except the accepted column and unlocking that,
reprotecting the sheet. Plus considering what else is going on in your
sheet. Then put code to manage that in the selection change event. Also,
when you make these changes, the clipboard may be cleared, so you would need
to used your record of the last range to recopy it.

Of course if the user disables macros or disables events, your efforts would
be thwarted.
 

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