#1   Report Post  
Richard
 
Posts: n/a
Default Changed Cell Address

I am using the Sub shown below.
Question: How do I determine the address of the changed
cell?

Private Sub Worksheet_Change(ByVal Target As Range)
Dim WatchRange As Range
Dim IntersectRange As Range

Set WatchRange = Range("E1:E31")

Set IntersectRange = Intersect(Target, WatchRange)

If IntersectRange Is Nothing Then
'MsgBox "Changes occured outside of range"
Else
'MsgBox "You modified the selected range of cells"
Application.Run "Test.xls!Time_Stamp"
End If

End Sub

  #2   Report Post  
JulieD
 
Posts: n/a
Default

Hi Richard

maybe
target.address

Cheers
JulieD

"Richard" wrote in message
...
I am using the Sub shown below.
Question: How do I determine the address of the changed
cell?

Private Sub Worksheet_Change(ByVal Target As Range)
Dim WatchRange As Range
Dim IntersectRange As Range

Set WatchRange = Range("E1:E31")

Set IntersectRange = Intersect(Target, WatchRange)

If IntersectRange Is Nothing Then
'MsgBox "Changes occured outside of range"
Else
'MsgBox "You modified the selected range of cells"
Application.Run "Test.xls!Time_Stamp"
End If

End Sub



  #3   Report Post  
JE McGimpsey
 
Posts: n/a
Default

You can use

Target.Address

Note that if multiple cells are selected, the *range* address is
returned by Target, so you won't know which cell was changed unless you
saved the previous values and compared them.



In article ,
"Richard" wrote:

Question: How do I determine the address of the changed
cell?

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
look up a value that results in a cell address outlook help New Users to Excel 7 January 26th 05 10:21 PM
Help Pls re macro cell address Hugh Jago Excel Discussion (Misc queries) 2 January 5th 05 09:01 PM
How do I dynamically retrieve the cell address of the last cell t. Nancy Excel Discussion (Misc queries) 1 December 20th 04 02:52 PM
How do I get one cell to record the time another cell was changed. Reigning in Seattle Excel Discussion (Misc queries) 1 December 17th 04 07:45 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


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