ActiveWorkbook.UpdateLink issue

davewatson86

New Member
Joined
Jul 8, 2019
Messages
30
Hi all

having an issue where i run the below code:

Code:
Sub UpdateLinks()
Dim Location As Variant
Dim File_Name As String


Application.ScreenUpdating = False
Application.EnableEvents = False


Call unprotect
    
For i = 5 To WS_Admin.Range("C4").End(xlDown).Row


    File_Name = WS_Admin.Range("C" & i).Value & " Quote Tracker.xlsb"
    Location = Application.ActiveWorkbook.Path & "\" & File_Name
    
    ActiveWorkbook.UpdateLink Name:=Location, Type:=xlExcelLinks
    Application.Calculate

Next i


Call protect


Application.EnableEvents = True
Application.ScreenUpdating = True


End Sub

The code runs without any errors but the destination workbook will not show the values from the source workbooks.

Strange thing is that if i double click on a cell that i know is different in the source workbook and hit enter just that individual cell updates.

what am i doing wrong?

Source workbooks are closed and all workbooks where created in the same version of excel.

Many thanks for your help as id be lost without the guidance of this forum.

Regards
Dave
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

Forum statistics

Threads
1,214,430
Messages
6,119,453
Members
448,898
Latest member
drewmorgan128

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top