Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
General Format altered/corrupted? | Excel Discussion (Misc queries) | |||
Altered Column Width | Excel Discussion (Misc queries) | |||
Altered Column Width | New Users to Excel | |||
Altered Column Width | Excel Worksheet Functions | |||
highlighting altered cells | Excel Discussion (Misc queries) |