+ Reply to Thread
Results 1 to 4 of 4

Thread: Paste event

  1. #1
    Forum Contributor
    Join Date
    08-09-2005
    MS-Off Ver
    2003 & 2007
    Posts
    111

    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

  2. #2
    Vacation's Over
    Guest

    RE: 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
    >
    >


  3. #3
    Forum Contributor
    Join Date
    08-09-2005
    MS-Off Ver
    2003 & 2007
    Posts
    111
    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

  4. #4
    Tom Ogilvy
    Guest

    Re: 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" <dlh.1wwx2a_1129327517.2995@excelforum-nospam.com> wrote in message
    news:dlh.1wwx2a_1129327517.2995@excelforum-nospam.com...
    >
    > 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
    >




Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0