Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SetLinkOnData only fires once?

21 views
Skip to first unread message

ppic...@hotmail.com

unread,
Dec 3, 2007, 10:08:31 AM12/3/07
to
I'm looking for a bit of help with an Excel "SetLinkOnData" problem.

I'm trying to update an SQL database when my spreadsheet is updated
via a DDE link. The spreadsheet has many DDE links on it, and I wish
to dynamically set the sub that SetLinkOnData runs when it detects an
event.
The code I have written seems to detect the first 'initial' change for
each DDE Link cell values but any further DDE updates do not fire
anything!

The code i'm using to configure the DDE SetLinkOnData events is (This
code is in the "Workbook_Open" code section)

'*Configure DDE Links*

aLinks = ActiveWorkbook.LinkSources(xlOLELinks)
If Not IsEmpty(aLinks) Then
For i = 1 To UBound(aLinks)
ActiveWorkbook.SetLinkOnData "=" & aLinks(i),
Module7.AddSQLData(x)
Next i
End With


Many Thanks

Paul P

0 new messages