VBA, changeLink error

francosueho82

New Member
Joined
Apr 10, 2024
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Dear all,
i have below question:
Periodically i will download a new file from the systems and update the old one in my excel file.
for example, i fill use New File to replace the Old file , VBA i write , such as :

ActiveWorkbook.ChangeLink Name:=Oldfilename, NewName:=Newfilename, Type:=xlExcelLinks

however, error message prompt after run:
Run-time error' 1004' Method 'Changelink of Object'_workbook failed.

i can confirm that both path of the new and old file are correct. can you some help to give me some advice ?

THank you very much for your kindness.
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Forum statistics

Threads
1,223,889
Messages
6,175,224
Members
452,620
Latest member
dsubash

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