SetLinkOnData only fires once?

P

ppicozzi

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
 

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