Change source: 1 wkbk with 8 links to different sheets now moved to new locations.

jango11965

New Member
Joined
Nov 21, 2014
Messages
2
My workbooks have been freezing so I move a few larger sheets to different and sometimes new workbooks. Some links assumed the new location path. Howeve in other wkbk now cannot change source for each of my 8 links from old to new location path. Currently remember old path.
When I highlight 1 sheet in the link list and change source to new location all links to other sheets that did not require changing to that sheet assumed path of first change also changed source(to 1st new location selected).
Ques therefore is, can I change source for each of 8 links in one workbook to 8 new individual Locations?
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
mass change the hyperlinks to the new paths.

Code:
Sub RemapLinks()
Dim vCell, vDir


vDir = "C:\Users\1029\Documents\New folder"


Range("B2").Select
While ActiveCell.Value <> ""
   If ActiveCell.Formula <> "" Then
       Debug.Print ActiveCell.FormulaR1C1
       'Debug.Print ActiveCell.Formula
       vCell = Mid(ActiveCell.Formula, InStrRev(ActiveCell.Formula, "\"))
       
       ActiveCell.Formula = "='" & vDir & vCell
   End If
   
   ActiveCell.Offset(1, 0).Select  'next row
Wend
End Sub
 
Last edited:
Upvote 0
So happy a solution is possible, thanks. I am including a scenario to better explain issue to know if code will fix.
All old and new wkbk are in the same folder. I moved multiple sheets to 3 new wkbk in same folder.
One old wkbk has links on multiple lines that need to point to new sheets now in different wkbks for hundred of cells because the current path points to valid wkbk but sheet is in new wkbk.
 
Upvote 0

Forum statistics

Threads
1,214,858
Messages
6,121,960
Members
449,057
Latest member
FreeCricketId

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