Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello
I'm developing a library of commodity codes each entry will have a hyperlink to the vendor cut sheet. I need to redirect all the hyperlinks to another directory, besides going to each hyperlink and re-educating it - I'm hoping someone can help me with a macro or vba code. cheers, jkb |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi jkb66
Try this one Sub tester() Dim hlink As Hyperlink For Each hlink In ActiveSheet.Hyperlinks If InStr(hlink.Address, "\Data") Then hlink.Address = Application.Substitute( _ hlink.Address, "\Data", "\Data2") End If Next End Sub -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "jkb66" wrote in message ... Hello I'm developing a library of commodity codes each entry will have a hyperlink to the vendor cut sheet. I need to redirect all the hyperlinks to another directory, besides going to each hyperlink and re-educating it - I'm hoping someone can help me with a macro or vba code. cheers, jkb |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanx Ron
Unfortuately the original addresses for each of the cut sheets are all in different directories, in an effort to make this a portable list- I've copied all the cut sheets to reside in the file location with the excel spreadsheet. here's an example of an orginal address (I'm not responsible for the file path!) \\SLI0014\_017191$\4000 Eng\4700 Elect\47EX Engineering\47ES Material or Equipment Specification\Material Cut Sheets\Power\Power Cables & Wire\7847-PC010.PDF but now all I need the file path to say is 7847-PC010.PDF! I would appreciate any ideas. jkb |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this one
Sub tester2() Dim hlink As Hyperlink For Each hlink In ActiveSheet.Hyperlinks hlink.Address = Mid(hlink.Address, InStrRev(hlink.Address, "\") + 1, 255) Next End Sub -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "jkb66" wrote in message ... Thanx Ron Unfortuately the original addresses for each of the cut sheets are all in different directories, in an effort to make this a portable list- I've copied all the cut sheets to reside in the file location with the excel spreadsheet. here's an example of an orginal address (I'm not responsible for the file path!) \\SLI0014\_017191$\4000 Eng\4700 Elect\47EX Engineering\47ES Material or Equipment Specification\Material Cut Sheets\Power\Power Cables & Wire\7847-PC010.PDF but now all I need the file path to say is 7847-PC010.PDF! I would appreciate any ideas. jkb |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excellent thanx Ron! that worked very well - have a great day!
jkb "Ron de Bruin" wrote: Try this one Sub tester2() Dim hlink As Hyperlink For Each hlink In ActiveSheet.Hyperlinks hlink.Address = Mid(hlink.Address, InStrRev(hlink.Address, "\") + 1, 255) Next End Sub -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "jkb66" wrote in message ... Thanx Ron Unfortuately the original addresses for each of the cut sheets are all in different directories, in an effort to make this a portable list- I've copied all the cut sheets to reside in the file location with the excel spreadsheet. here's an example of an orginal address (I'm not responsible for the file path!) \\SLI0014\_017191$\4000 Eng\4700 Elect\47EX Engineering\47ES Material or Equipment Specification\Material Cut Sheets\Power\Power Cables & Wire\7847-PC010.PDF but now all I need the file path to say is 7847-PC010.PDF! I would appreciate any ideas. jkb |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to paste hyperlinks | Excel Discussion (Misc queries) | |||
Count hyperlinks in a mixed range | Excel Worksheet Functions | |||
macro to run on a list of hyperlinks | Excel Programming | |||
Excel should let you remove hyperlinks for any range or selection | Excel Discussion (Misc queries) | |||
Need macro help to edit hyperlinks | Excel Programming |