+ Reply to Thread
Results 1 to 3 of 3

Changed Cell Address

  1. #1
    Richard
    Guest

    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. #2
    JulieD
    Guest

    Re: Changed Cell Address

    Hi Richard

    maybe
    target.address

    Cheers
    JulieD

    "Richard" <[email protected]> wrote in message
    news:[email protected]...
    >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. #3
    JE McGimpsey
    Guest

    Re: Changed Cell Address

    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 <[email protected]>,
    "Richard" <[email protected]> wrote:

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


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1