Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to obtain Cell Address and/or Select all sheet-cells with xlExcelLinks
2003, 2007
With the code below as a base point: Is there a way to obtain 1) Obtain the address of and/or 2) Select all cells with links? Sub OpenAllLinks() Dim arLinks As Variant Dim intIndex As Integer arLinks = ActiveWorkbook.LinkSources(xlExcelLinks) If Not IsEmpty(arLinks) Then For intIndex = LBound(arLinks) To UBound(arLinks) ActiveWorkbook.OpenLinks arLinks(intIndex) Next intIndex Else MsgBox "The active workbook contains no external links." End If End Sub TIA EagleOne |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to obtain Cell Address and/or Select all sheet-cells with xlEx
I'd try something like this:
Option Explicit Sub TestLinks() Dim myHyperlink As Excel.Hyperlink Dim myRange As Excel.Range Set myRange = Nothing Debug.print ActiveSheet.Hyperlinks.Count For Each myHyperlink In ActiveSheet.Hyperlinks Debug.Print myHyperlink.Parent.Address If myRange Is Nothing Then Set myRange = myHyperlink.Parent Else Set myRange = Union(myRange, myHyperlink.Parent) End If Next myHyperlink If Not myRange Is Nothing Then myRange.Select End If End Sub " wrote: 2003, 2007 With the code below as a base point: Is there a way to obtain 1) Obtain the address of and/or 2) Select all cells with links? Sub OpenAllLinks() Dim arLinks As Variant Dim intIndex As Integer arLinks = ActiveWorkbook.LinkSources(xlExcelLinks) If Not IsEmpty(arLinks) Then For intIndex = LBound(arLinks) To UBound(arLinks) ActiveWorkbook.OpenLinks arLinks(intIndex) Next intIndex Else MsgBox "The active workbook contains no external links." End If End Sub TIA EagleOne |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to: IF FALSE in 2 Cells, Then Obtain Value From 3rd Cell? | Excel Programming | |||
Find Blank Cells and List Each Cell Address in Another Sheet | Excel Programming | |||
How to obtain cell address of a succesful VLookup? | Excel Programming | |||
How do I obtain the address of a cell using the vlookup function? | Excel Worksheet Functions | |||
Would like to Obtain a Cell Address from a vlookup function | Excel Programming |