LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Adding rows to create list from DDE data

I have data updated via a DDE link and each time the DDE link updates I need to capture the data so that it creates a list by adding a new row. I have used the SheetCalculateEvent to trigger the update to cell B2 (which links to another cell which is the DDE link) which then invokes the SheetChangeEvent.

My problem is that on each update a new row is inserted at the top of the list for the new data and this causes the screen to flicker as all the data is moved. I would rather have the data just build progressively so that the new data is added to the bottom of the list. Can someone help how best to achieve this? My code is

Private Sub Worksheet_Calculate(

Worksheet_Change Range("$B$2"

End Su

Private Sub Worksheet_Change(ByVal Target As Range
If Target.address = "$B$2" The
Sheets("intraday").Selec
Range("A2:E2").Selec
Selection.Cop
Range("A4").Selec
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks
:=False, Transpose:=Fals
If Range("B4") Range("B5") The
Range("I10").Selec
Selection.EntireRow.Inser
Range("A4:H4").Selec
Selection.Cop
Range("I10").Selec
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks
:=False, Transpose:=Fals
Range("A4:E4").Selec
Selection.Cop
Range("A5").Selec
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks
:=False, Transpose:=Fals
End I
End I

End Su

I should explain that I copy the range A2..E2 (which contains the target cell) to A4..E4, and this is then compared to the same data prior to the last update which is contained at A5..E5 to do some extra calcs in F5..H5. If the new update at B4 is than the last update at B5, then the new update is added to the list at I10..P10

Any help gratefully received

Thanks, Simon
 
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
Automatically extend a list when adding a new data to another list JB Excel Discussion (Misc queries) 0 March 25th 10 02:50 PM
create 1 master list from a combination of rows and columns Jason Excel Discussion (Misc queries) 3 August 17th 09 06:24 PM
Adding data to create ranges jodieg Excel Worksheet Functions 4 February 13th 07 09:34 PM
Want to Create a List in Excel 2002; Don't see List in Data Menu? Manoj Excel Discussion (Misc queries) 2 April 7th 06 07:34 PM
Does Excel 2002 have a List>Create List option under Data? Jesse Excel Discussion (Misc queries) 3 May 20th 05 01:52 PM


All times are GMT +1. The time now is 12:00 AM.

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"