ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Paste event (https://www.excelbanter.com/excel-programming/342871-paste-event.html)

dlh[_8_]

Paste event
 

Is there a way to capture the event of Pasting (or Dragging and
Dropping) something into a worksheet? I'd like to intercept such
events and make sure that only values are pasted, so the user doesn't
inadvertently muck up the formatting of the worksheet.

Or would it be better to write a macro to restore the original
formatting after the fact? (That would be long and tedius.)

I've found a BeforeDropOrPaste event, but I can't find any examples of
how to use it and it seems rather nontrivial.

-dlh


--
dlh
------------------------------------------------------------------------
dlh's Profile: http://www.excelforum.com/member.php...o&userid=26113
View this thread: http://www.excelforum.com/showthread...hreadid=476339


Vacation's Over

Paste event
 
http://www.cpearson.com/excel/events.htm


"dlh" wrote:


Is there a way to capture the event of Pasting (or Dragging and
Dropping) something into a worksheet? I'd like to intercept such
events and make sure that only values are pasted, so the user doesn't
inadvertently muck up the formatting of the worksheet.

Or would it be better to write a macro to restore the original
formatting after the fact? (That would be long and tedius.)

I've found a BeforeDropOrPaste event, but I can't find any examples of
how to use it and it seems rather nontrivial.

-dlh


--
dlh
------------------------------------------------------------------------
dlh's Profile: http://www.excelforum.com/member.php...o&userid=26113
View this thread: http://www.excelforum.com/showthread...hreadid=476339



dlh[_9_]

Paste event
 

Thanks for the link, but Chip Pearson's site doesn't cover th
BeforeDropOrPaste event.

Or is there some other event that I should be capturing?

-dl

--
dl
-----------------------------------------------------------------------
dlh's Profile: http://www.excelforum.com/member.php...fo&userid=2611
View this thread: http://www.excelforum.com/showthread.php?threadid=47633


Tom Ogilvy

Paste event
 
that event is from the MSFORMS library, not the Excel library. Therefore it
has nothing to do with Excel events.

--
Regards,
Tom Ogilvy

"dlh" wrote in message
...

Thanks for the link, but Chip Pearson's site doesn't cover the
BeforeDropOrPaste event.

Or is there some other event that I should be capturing?

-dlh


--
dlh
------------------------------------------------------------------------
dlh's Profile:

http://www.excelforum.com/member.php...o&userid=26113
View this thread: http://www.excelforum.com/showthread...hreadid=476339





All times are GMT +1. The time now is 07:30 PM.

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