+ Reply to Thread
Results 1 to 3 of 3

Record Value Change from a Live Feed

  1. #1
    Registered User
    Join Date
    06-09-2011
    Location
    New York, NY
    MS-Off Ver
    Excel 2007
    Posts
    3

    Exclamation Record Value Change from a Live Feed

    I need VBA code that records the number of times a cell in a worksheet has a value change.

    For example if cell J5 contains the live feed, if thatl value is changed to this would be recorded as 1 in the cell using the recording function. If that Cell value is then changed to 11, the cell change would be recorded as 2.

    I'm really new to all this code stuff so help would be very much aprreciated.

    I've tried using this and lsight variations, but none have worked:
    Please Login or Register  to view this content.

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Record Value Change from a Live Feed

    I rechecked this code and found it was not really working like you wanted it to so I worked it out again and came up with a code the keep tracks of all past values of the cell you want to check and it also record time of change and who changed it.


    HERE IS THE NEW CODE
    Please Login or Register  to view this content.
    You have to set the Sheet3 the first time you start your counter. I mean delete all but the first 2 rows. Input the first and actual value of the cell and fill the other 3 columns.


    You might want to hide the Sheet3 so no one will see or change it.
    Attached Files Attached Files
    Last edited by p24leclerc; 07-17-2011 at 11:03 PM. Reason: Found an error in code

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Record Value Change from a Live Feed

    Can you elaborate regards "live feed" ? If you're referring to a DDE then a Worksheet_Change event along the lines of the above will not work I'm afraid.

    If you are indeed referring to DDE then you might consider using some Static variables and the Calculate event else assigning the DDE target cell to a control which would in turn fire it's own change event as and when the DDE target updated.

    Your initial code implies DDE and use of Statics, however, you must remember to update OldVal when incrementing.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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