hi!
I have Excel file with several DDE links from external sources, updated @ random intervals. For the example sake let's say there are three links.
I would like to know which of the three links was updated last..
How can I do that?
The links are the part of the array.. Can I identify the link by number? By name? By placing it in a different worksheet or range and returning worksheet with a Range name?
I have a code that triggers an event when any af these links is updated, but I want to isolate down to specific links and make my code tighter.
Any help will be appreciated. Here is a code if you want to see how it was done.
------------------------------------
Dim Links As Variant
' Obtain an array for the links to Excel workbooks
' in the active workbook.
Links = ActiveWorkbook.LinkSources(xlOLELinks)
' If the Links array is not empty, then open each
' linked workbook. If the array is empty, then
' display an error message.
If Not IsEmpty(Links) Then
For i = 1 To UBound(Links)
Workbook.SetLinkOnData Links(i), "myProcedureName"
Next i
Else
MsgBox "This workbook does not contain any links " & _
"to other workbooks"
End If
End Sub
Sub myProcedureName()
'my code goes here
End Sub
I have Excel file with several DDE links from external sources, updated @ random intervals. For the example sake let's say there are three links.
I would like to know which of the three links was updated last..
How can I do that?
The links are the part of the array.. Can I identify the link by number? By name? By placing it in a different worksheet or range and returning worksheet with a Range name?
I have a code that triggers an event when any af these links is updated, but I want to isolate down to specific links and make my code tighter.
Any help will be appreciated. Here is a code if you want to see how it was done.
------------------------------------
Dim Links As Variant
' Obtain an array for the links to Excel workbooks
' in the active workbook.
Links = ActiveWorkbook.LinkSources(xlOLELinks)
' If the Links array is not empty, then open each
' linked workbook. If the array is empty, then
' display an error message.
If Not IsEmpty(Links) Then
For i = 1 To UBound(Links)
Workbook.SetLinkOnData Links(i), "myProcedureName"
Next i
Else
MsgBox "This workbook does not contain any links " & _
"to other workbooks"
End If
End Sub
Sub myProcedureName()
'my code goes here
End Sub