Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copied info from Excel worksheet, but pasted info won't work in fo KRISTENV Excel Discussion (Misc queries) 3 January 8th 09 03:13 PM
Running code on a drop down selection change Steve Haack Excel Worksheet Functions 1 April 26th 05 05:03 AM
Selection change: How to run a Macro Maria[_6_] Excel Programming 1 March 2nd 04 12:57 PM
Running a macro before saving file Einollah2001 Excel Programming 4 February 10th 04 12:21 AM
Macro to only change selection Del[_3_] Excel Programming 3 December 16th 03 04:30 PM


All times are GMT +1. The time now is 02:06 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"