Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Noob question - Worksheet_Change

Hi all,

I am running some code against the Worksheet_Change event that picks out the
target.value and writes the output to XML. What I've noticed lately is,
if/when a user performs a copy from one cell, and pastes the value to
another cell or a range of cells, my Worksheet_Change event fires, but does
not trap the target.value from the first cell that is populated nor does it
run for every cell that had new data pasted to it.

Can someone point me in the right direction to code for this? If they paste
one value to five cells, I need to extract the new value from each
individual cell it was pasted to.

Thanks!
-Rich


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Noob question - Worksheet_Change

Rich,

If Target is more than one cell, you have to trap that (Target.Count 1),
and process each cell in that range

For Each cell In Target
'etc
Next cell

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Rich Wallace" wrote in
message ...
Hi all,

I am running some code against the Worksheet_Change event that picks out

the
target.value and writes the output to XML. What I've noticed lately is,
if/when a user performs a copy from one cell, and pastes the value to
another cell or a range of cells, my Worksheet_Change event fires, but

does
not trap the target.value from the first cell that is populated nor does

it
run for every cell that had new data pasted to it.

Can someone point me in the right direction to code for this? If they

paste
one value to five cells, I need to extract the new value from each
individual cell it was pasted to.

Thanks!
-Rich




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Noob question - Worksheet_Change

Thanks Bob,

The code is running as you suggested, but when I loop on the cell, my
Target.Row value is not reflecting the new value so I loop on the same cell
as many times as there are cells in the range.

Any ideas?

Thangs again,
-Rich

"Bob Phillips" wrote in message
...
Rich,

If Target is more than one cell, you have to trap that (Target.Count 1),
and process each cell in that range

For Each cell In Target
'etc
Next cell

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Rich Wallace" wrote in
message ...
Hi all,

I am running some code against the Worksheet_Change event that picks out

the
target.value and writes the output to XML. What I've noticed lately is,
if/when a user performs a copy from one cell, and pastes the value to
another cell or a range of cells, my Worksheet_Change event fires, but

does
not trap the target.value from the first cell that is populated nor does

it
run for every cell that had new data pasted to it.

Can someone point me in the right direction to code for this? If they

paste
one value to five cells, I need to extract the new value from each
individual cell it was pasted to.

Thanks!
-Rich






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Noob question - Worksheet_Change

Rich,

In your code you don't deal with Target any more. The object that you
process now becomes cell (or whatever else you call it)

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Rich Wallace" wrote in
message ...
Thanks Bob,

The code is running as you suggested, but when I loop on the cell, my
Target.Row value is not reflecting the new value so I loop on the same

cell
as many times as there are cells in the range.

Any ideas?

Thangs again,
-Rich

"Bob Phillips" wrote in message
...
Rich,

If Target is more than one cell, you have to trap that (Target.Count

1),
and process each cell in that range

For Each cell In Target
'etc
Next cell

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Rich Wallace" wrote in
message ...
Hi all,

I am running some code against the Worksheet_Change event that picks

out
the
target.value and writes the output to XML. What I've noticed lately

is,
if/when a user performs a copy from one cell, and pastes the value to
another cell or a range of cells, my Worksheet_Change event fires, but

does
not trap the target.value from the first cell that is populated nor

does
it
run for every cell that had new data pasted to it.

Can someone point me in the right direction to code for this? If they

paste
one value to five cells, I need to extract the new value from each
individual cell it was pasted to.

Thanks!
-Rich








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
Find text and return - NOOB question rapid1 Excel Discussion (Misc queries) 8 January 3rd 07 03:42 PM
Noob question letmeplay1977 Excel Worksheet Functions 2 October 5th 05 09:27 PM
Noob question Micro_pal New Users to Excel 2 September 4th 05 02:37 PM
Noob question Micro_pal Excel Discussion (Misc queries) 5 September 3rd 05 01:42 AM
nOOb formulas question patrick Excel Discussion (Misc queries) 1 March 8th 05 02:42 PM


All times are GMT +1. The time now is 12:35 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"