Automatically change source location of sheet data is linked to.

neodd70

New Member
Joined
Dec 11, 2015
Messages
1
This is a little long but I want to explain why my problem is happening. I have a bunch of spreadsheets that have links to a master spreadsheet and they all reside in the same folder. These spreadsheets are used as design tables for Solidworks. When a Solidworks 3D model is opened Solidworks will open the spreadsheet and apply the numbers in the cells to the dimensions in the model. When I save the model from Solidworks it will also save the design table which I've been told is actually an Excel Object in SolidWorks but it will save it as the same name and in the same location that the original Spreadsheet was in. As long as the folder name and path that the spreadsheets reside in doesn't change the links from the spreadsheets to the master spreadsheet remain linked. My issue is if I copy the folder and rename it. When I do this the links in the spreadsheets remain linked to the original location of the master spreadsheet. Right now what I have to do is open all of the spreadsheets including the master and then re-save them, this will re-establish the location in the links to the master spreadsheet residing in the same folder as the other spreadsheets, then I can copy and rename the folder containing the spreadsheets and the links remain ok. This didn't used to be an issue when I was using Excel 2003 but from 2007 on up the links become broken if the spreadsheets are saved from Solidworks. I've been told that this is a security thing with Excel and as of yet there are no fixes. I did read however that a macro could be created using VBA in Excel that would run when the spreadsheet was opened and that macro could in affect change the source location of the spreadsheet that it links to. My issue is that I do not know how to do this. If there is someone here that would be willing to help me I would be eternally grateful. I just need it to tell the spreadsheet that the location of the master spreadsheet it links to is in the same folder it is in. The master spreadsheet name never changes and neither do the names of the spreadsheets that link to it. TIA
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Forum statistics

Threads
1,223,237
Messages
6,170,930
Members
452,367
Latest member
TePunaBloke

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