Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default Is there a way to find out which cell has been altered?

The general idea is to run a macro when a cell changes.

I have figured out a workaround for now, using the Worksheet_Change object,
but is there any way to find out which cell has been altered?

We have Target as a ByVal, but thats the .value of the cell thats been
altered. How do I know the cell's reference?

TIA.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 535
Default Is there a way to find out which cell has been altered?

Hi Dave,

We have Target as a ByVal, but thats the .value of the cell thats been
altered. How do I know the cell's reference?


Target *is* the changed cell(s), so Target.Address yields its address and
Target.Parent.Name gives you the name of the worksheet that cell lives
in.

Regards,

Jan Karel Pieterse
Excel MVP
http://www.jkp-ads.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Is there a way to find out which cell has been altered?

Hi Dave,

Try:

Target.Address

---
Regards,
Norman



"DaveO" wrote in message
...
The general idea is to run a macro when a cell changes.

I have figured out a workaround for now, using the Worksheet_Change
object,
but is there any way to find out which cell has been altered?

We have Target as a ByVal, but thats the .value of the cell thats been
altered. How do I know the cell's reference?

TIA.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Is there a way to find out which cell has been altered?

I'm not clear on what your question is. In the Worksheet_Change
event, the Target variable is the cell that is changed. I don't
understand what you mean by "How do I know the cell's
reference?". Target *is* the cell reference. Do you mean how to
get the address? If so,

Dim Addr As String
Addr = Target.Address

Could you be more specific about what exactly you are trying to
do?


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"DaveO" wrote in message
...
The general idea is to run a macro when a cell changes.

I have figured out a workaround for now, using the
Worksheet_Change object,
but is there any way to find out which cell has been altered?

We have Target as a ByVal, but thats the .value of the cell
thats been
altered. How do I know the cell's reference?

TIA.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default Is there a way to find out which cell has been altered?

Guys, you;ve answered my question perfectly!!!

Thanks a lot.

"DaveO" wrote:

The general idea is to run a macro when a cell changes.

I have figured out a workaround for now, using the Worksheet_Change object,
but is there any way to find out which cell has been altered?

We have Target as a ByVal, but thats the .value of the cell thats been
altered. How do I know the cell's reference?

TIA.

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
General Format altered/corrupted? lwt1973 Excel Discussion (Misc queries) 1 August 13th 08 05:28 PM
Altered Column Width No Name Excel Discussion (Misc queries) 2 May 4th 07 06:08 PM
Altered Column Width No Name New Users to Excel 2 May 4th 07 06:08 PM
Altered Column Width No Name Excel Worksheet Functions 2 May 4th 07 06:08 PM
highlighting altered cells questionables Excel Discussion (Misc queries) 0 December 11th 06 10:41 PM


All times are GMT +1. The time now is 09:00 AM.

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"