Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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" wrote in message ... 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copied info from Excel worksheet, but pasted info won't work in fo | Excel Discussion (Misc queries) | |||
Running code on a drop down selection change | Excel Worksheet Functions | |||
Selection change: How to run a Macro | Excel Programming | |||
Running a macro before saving file | Excel Programming | |||
Macro to only change selection | Excel Programming |