Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default xlExcelLinks

How can I determin if a cell contains a link to a cell anotherworksheet
(xlExcelLinks )?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default 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 )?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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 )?




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to obtain Cell Address and/or Select all sheet-cells with xlExcelLinks [email protected] Excel Programming 1 May 15th 09 01:25 AM
ChangeLink xlExcelLinks Joe Bannister Excel Programming 0 July 10th 03 04:20 PM


All times are GMT +1. The time now is 09:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"