iainmartin100
New Member
- Joined
- Mar 9, 2011
- Messages
- 43
Hi,
I have the following simplified array formula in cell A1 Sheet1, If I wanted to update the link within excel itself I would simply click Edit>Links>Change Source and job done.
The issue is that this formula needs to be within a macro and just the result displayed in cell A1 Sheet1
{=INDEX('C:\link.xls]tab1'!$F$1:$F$100,MATCH($H$7&$C$68,'C:\link.xls]tab1'!$C$1:$C$100&'C:\link.xls]tab1'!$D$1:$D$100))}
The user could change the link at any time so I need to somehow refrance the exterenal link? I have tried the following but it doesn't come anywhere close to working, any ideas?
Sub macro3()
Dim WW As Variant
WW = ThisWorkbook.LinkSources(xlExcelLinks)
Range("A1").Formula = "='WW Sheet1'!$A$1"
End Sub
I have the following simplified array formula in cell A1 Sheet1, If I wanted to update the link within excel itself I would simply click Edit>Links>Change Source and job done.
The issue is that this formula needs to be within a macro and just the result displayed in cell A1 Sheet1
{=INDEX('C:\link.xls]tab1'!$F$1:$F$100,MATCH($H$7&$C$68,'C:\link.xls]tab1'!$C$1:$C$100&'C:\link.xls]tab1'!$D$1:$D$100))}
The user could change the link at any time so I need to somehow refrance the exterenal link? I have tried the following but it doesn't come anywhere close to working, any ideas?
Sub macro3()
Dim WW As Variant
WW = ThisWorkbook.LinkSources(xlExcelLinks)
Range("A1").Formula = "='WW Sheet1'!$A$1"
End Sub