Changelink

charlee63

Board Regular
Joined
Jan 7, 2010
Messages
144
Each week I need to change about 30 links in a file. I am trying to write a macro to do this.
Sub Macro7()
ActiveWorkbook.ChangeLink Name:= _
"\\HFNMSFS01V\Data\PERISHABLES\Merchandising\Weekly Sales and Vouchers\7-22-23\DU Dairy Financial - 07-22-23.xlsm" _
, NewName:= _
"\\HFNMSFS01V\Data\PERISHABLES\Merchandising\Weekly Sales and Vouchers\7-29-23\DU Dairy Financial - 07-29-23.xlsm" _
, Type:=xlExcelLinks
End Sub

Get this error know this error and how to correct?
1690482390350.png
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
What checking have you done regarding whether the existing link specified is correct, and also that the replacement link file exists in the location specified?
 
Upvote 0

Forum statistics

Threads
1,215,844
Messages
6,127,252
Members
449,372
Latest member
charlottedv

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