![]() |
xlExcelLinks
How can I determin if a cell contains a link to a cell anotherworksheet
(xlExcelLinks )? |
xlExcelLinks
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. "Ladan" wrote in message ... How can I determin if a cell contains a link to a cell anotherworksheet (xlExcelLinks )? |
xlExcelLinks
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 "JLGWhiz" wrote: 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. "Ladan" wrote in message ... How can I determin if a cell contains a link to a cell anotherworksheet (xlExcelLinks )? |
All times are GMT +1. The time now is 05:29 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com