+ Reply to Thread
Results 1 to 2 of 2

how do i record changing cell data (cell is dde linked)

  1. #1
    Morph
    Guest

    how do i record changing cell data (cell is dde linked)

    I have a cell that is constantly changing value, and need to record these
    changes so I can plot them on a chart.

  2. #2
    Dave Peterson
    Guest

    Re: how do i record changing cell data (cell is dde linked)

    How are they changing?

    Is a user changing them by typing them in?

    You can do it using an event macro.

    Rightclick on the worksheet tab that should have this behavior. Select view
    code. Paste this into the code window.

    Then back to excel to test it out:

    Option Explicit
    Private Sub Worksheet_Change(ByVal Target As Range)

    Dim DestCell As Range

    With Target
    If .Cells.Count > 1 Then Exit Sub
    If Intersect(.Cells, Me.Range("a1")) Is Nothing Then Exit Sub
    If IsEmpty(.Value) Then Exit Sub
    If IsError(.Value) Then Exit Sub

    With Worksheets("sheet2")
    Set DestCell = .Cells(.Rows.Count, "A").End(xlUp).Offset(1, 0)
    End With

    DestCell.Value = .Value

    End With

    End Sub

    I logged the value into sheet2 column A.

    Morph wrote:
    >
    > I have a cell that is constantly changing value, and need to record these
    > changes so I can plot them on a chart.


    --

    Dave Peterson

+ 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