changing links through macro

cmefly

Well-known Member
Joined
May 13, 2003
Messages
683
hi,

using vba, how can i find out the filename (path and filename) of the file that is linked to my spreadsheet??? would like to assign it to a variable.....

any ideas?

Marc
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Marc

What version of Excel are you using?

In the most recent versions Application.FileSearch isn't supported.

I'm not sure it would've done what you want anyway.

Mind you I'm not 100% sure what that it is you want to do.

In what way is the file you want to find out about 'linked' to your file?
 
Upvote 0
hi nori,

i've got a worksheet that does a bunch of calculations. It is linked to a customer's file.
I have many customers....lol

so i just want a macro that goes through each file in a specific folder and updates the calculation worksheet and saves it as say "calculation_customer_soandso.xls"...etc...

i'm trying to change the links in a macro but i'm unable to find a way to get the name of the file that is currently linked to the worksheet....if i had that, then i could use


ThisWorkbook.ChangeLink Name:=OldLink, NewName:=NewLink, Type:=xlExcelLinks


where oldlink and newlink are variables....

makes sense?
 
Upvote 0
Oops, my apologies - I got the thread mixed up with another one that was about Application.FileSearch.:oops:

Think it's time to visit the opticians.:)

Mind you I'm still not sure what you want to do.

Do you want to go through each customer file and take data from it, do some calculations and then save the calculations for that customer in another file?

Anywhere close?
 
Upvote 0

Forum statistics

Threads
1,224,550
Messages
6,179,462
Members
452,915
Latest member
hannnahheileen

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