Whoops - sorry - yes.
What I should have said was "to avoid the problem you need to set an
impossible base before creating the hyperlinks". That will cause the
hyperlinks to be created as absolute rather than relative.
Running the following macro should do the trick of converting the
relative links to absolute:
Sub FixHyperLinks()
Dim WS As Worksheet
Dim H As Hyperlink
ActiveWorkbook.BuiltinDocumentProperties("Hyperlink Base") = _
"\\NoServer\NoFolder"
For Each WS In ActiveWorkbook.Worksheets
For Each H In WS.Hyperlinks
If Mid(H.Address, 2, 1) <> ":" And _
Left(H.Address, 2) <> "\\" Then
H.Address = ActiveWorkbook.Path & "\" & H.Address
End If
Next
Next
End Sub
Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup
I added the hyperlink base first and then created the hyperlinks in the sheet
and that worked. But this is something we have to do each time. This never
used to happen before.
Will the macro take care of it permanantly? Where do I enter it in?
Thanks.
> Whoops - sorry - yes.
> What I should have said was "to avoid the problem you need to set an
[quoted text clipped - 22 lines]
> MVP - Microsoft Excel, Oxford, England
> No email replies please - respond to newsgroup
Bill Manville - 17 Jul 2008 23:43 GMT
> Will the macro take care of it permanantly?
Yes
> Where do I enter it in?
In the VB editor, in a standard module
Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup