Collecting Live Data

J

Jean

I have a macro which collects live data from a DDE link. Every time
there is a data update it copies the new data and adds it to the
bottom of the table of all previous data. The problem is I want the
new data to be added to the top of the 'table' since it is the new
data I am interested in (The data is stock market price/volume), and I
don't want to have to scroll down to the bottom of all the records
(00's/sec) to see the most recent update.

The macro I use (below) is not mine but seems to be efficient. If
anyone has a suggestion as to how I can resolve or even improve the
existing code I would greatly appreciate it.

Jean

==========
Sub CopyPasteTicks()
Dim lRow
With ThisWorkbook
With sht1
lRow = .Range("DSDATE").End(xlDown).Row
If lRow = 65536 Then
.Range("$B$6:$d6").Value = .Range("$B$5:$d$5").Value
Else
.Range("$B$" & lRow + 1 & ":$d$" & lRow + 1).Value =
..Range("$B$5:$D$5").Value
End If
If lRow = 65530 Then
bRunNow = False
End If
End With
End With
Application.StatusBar = "Data Copied to row " & lRow + 1
End Sub
==========
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top