create a link between two Excel files which can be dynamic. VBA code.

KlausW

Active Member
Joined
Sep 9, 2020
Messages
453
Office Version
  1. 2016
Platform
  1. Windows
Hello everyone

Can you create a link between two Excel files which can be dynamic. VBA code.

So that you can change the name in B11 also function the link with a new name.

What the link looks like when it is not dynamic.

='D:\DNBR 2024\Service lists\Service lists\[NK.xlsm]NK'!C12

As I think it can look like if it is Dynamic

='D:\DNBR 2024\Service lists\Service lists\[B11.xlsm]B11'!C12

The link must work on the following cells C12 to NC 15.

Does that make sense, can anyone help?

Any help will be appreciated.

Best Regards

Klaus W

I Place this VBA-code in

Private Sub Workbook_Open()

ActiveWorkbook.UpdateLink Name:=ActiveWorkbook.LinkSources

End Sub
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

Forum statistics

Threads
1,223,863
Messages
6,175,052
Members
452,607
Latest member
OoM_JaN

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