+ Reply to Thread
Results 1 to 2 of 2

Saving copied info while running a Selection Change Macro

  1. #1
    J Streger
    Guest

    Saving copied info while running a Selection Change Macro

    I am using the Worksheet_SelectionChange subroutine to change the contents of
    a cell dependent upon the location of the active cell. This has the
    unfortunate side effect that eliminates the ability to copy/cut and paste,
    except for fill right/down.

    I know how to determine if the selection change was preceeded by cut/copy
    (by seeing if the application is in cutcopymode), but I wanted to know if
    there was a way to capture the copied/cut information into a variable prior
    to it being lost by the rest of the code. I assume a property saves this
    information as a string or array but I can;t find it. thanks!
    --
    *********************
    J Streger
    MS Office Master 2000 ed.
    MS Project White Belt 2003


  2. #2
    Bernie Deitrick
    Guest

    Re: Saving copied info while running a Selection Change Macro

    J,

    You could use a hidden workhseet to paste the clipboard contents prior to
    running your code. Then when you need the range again, copy it from the
    hidden worksheet. That's the technique that John Walkenbach (Excel guru)
    uses in his undo routine.

    HTH,
    Bernie
    MS Excel MVP


    "J Streger" <[email protected]> wrote in message
    news:[email protected]...
    >I am using the Worksheet_SelectionChange subroutine to change the contents
    >of
    > a cell dependent upon the location of the active cell. This has the
    > unfortunate side effect that eliminates the ability to copy/cut and paste,
    > except for fill right/down.
    >
    > I know how to determine if the selection change was preceeded by cut/copy
    > (by seeing if the application is in cutcopymode), but I wanted to know if
    > there was a way to capture the copied/cut information into a variable
    > prior
    > to it being lost by the rest of the code. I assume a property saves this
    > information as a string or array but I can;t find it. thanks!
    > --
    > *********************
    > J Streger
    > MS Office Master 2000 ed.
    > MS Project White Belt 2003
    >




+ Reply to Thread

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.6.0 RC 1