LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
JE McGimpsey
 
Posts: n/a
Default

Yes, the line of code exists because there is no event which returns
just the cell(s) that were changed. Instead, Target returns the
*selected* cells when the change was made.

Thus Worksheet_Change can't tell whether you pasted into all of the
cells, or simply had a range selected and changed one cell.

To to that would require that you do something like saving the selected
range in a variable (or another range) when it was selected. Then when
the worksheet_change() fires, you could compare the new values to the
stored values, time-stamping each cell that changed. Note that since the
selection change occurs before the Worksheet_Change event, there's the
need to make that storage somewhat persistent.




In article ,
"Antonio Duarte" wrote:

So, is there any reason for the existence of this line of code?
Do you have any idea on what is happening?

 
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
display multiple lines of text within a merged cell automatically sssizemore Excel Worksheet Functions 1 June 15th 05 02:30 AM
copy combobox - cell link to change automatically Bojana Excel Worksheet Functions 1 June 8th 05 02:35 PM
Edit cell automatically takes you to cell cgrant Excel Worksheet Functions 1 May 20th 05 04:30 PM
How do I automatically hide columns in a worksheet based on a cell value? dkhedkar Excel Worksheet Functions 1 March 5th 05 12:20 AM
copying a cell to another cell automatically Amit New Users to Excel 2 January 12th 05 01:41 PM


All times are GMT +1. The time now is 11:34 PM.

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

About Us

"It's about Microsoft Excel"