formula external link
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Formula with an external link - VBA

Formula with an external link - VBA

resolvedResolved · High Priority · Version 2003

replyReply Tue 1 Nov 2011, 11:06Delegate Iain said...

Iain has attended:
Access Introduction course
Access Intermediate course
Access Advanced course

Formula with an external link - VBA

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

For upcoming training course dates see: Pricing & availability

replyReply Tue 1 Nov 2011, 14:57Delegate Iain said...

RE: Formula with an external link - VBA

Solved by using the MrExcel forum, Thanks

 

Please browse our web site to find out more about
excel training companies london and other Microsoft training courses.

Excel tip:

Generating simple column charts

1.Select cell range containing data/figures
2. Press F11

View all Excel hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard