xlExcelLinks

  • Thread starter Thread starter Ladan
  • Start date Start date
This is in VBA help.

This example displays a list of OLE and DDE links in the active workbook.
The example should be run on a workbook that contains one or more linked
Word objects.

aLinks = ActiveWorkbook.LinkSources(xlOLELinks)
If Not IsEmpty(aLinks) Then
For i = 1 To UBound(aLinks)
MsgBox "Link " & i & ":" & Chr(13) & aLinks(i)
Next i
End If
You can also check dependents and precedents.
 
Hi,
Thanks for your answer.
What I want is how to decide if a cell contains a link, not to get all link
at once. The code you mentioned will enable you to get all links and do
something with them based on their index number.

I want to have an event handler (e.g. before right click), so that if you
double click on a cell, it opens the link, if the cell contains a link. (I
could do a search in formula to see if it contains the extention e.g .xlsx or
..xlsm ... but I want to see if there is a better way of doing so.

Regards
Ladan
 
Back
Top