Copying worksheets and hyperlinks VBA

DrH100

Board Regular
Joined
Dec 30, 2011
Messages
78
I have the following code

HTML:
Public Sub Copyworksheet()
Dim wb As Workbook
Set wb = Workbooks.Open("\\My file path in here", UpdateLinks:=True)
wb.Worksheets("People").Copy before:=ThisWorkbook.Worksheets(3)
wb.Close savechanges:=True
Set wb = Nothing
End Sub

Which opens the specified workbook. Copies the worksheet called "People" and puts the copy in my original workbook.

That all works fine apart from any hyperlinks that were on the "people" worksheet no longer work.

If I hover the mouse over the hyperlink it shows file:///\\ then the file path and gives me canno ope the specified file.

Is there anything that can be done to make sure the hyperlinks work when I copy them across with the worksheet?

Any help appreciated
 
DrH100, I am having the same issue as you did here, but I did not see any answers to your problem. Was it resolved?
 
Upvote 0

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