mtkalman
06-12-2017, 01:30 AM
Hello!
I have a sheet filled with around 100 rows of data. In each row the first cell has a six digit long number in it, and there is a folder, with word files, with the same name for each and every one.
I would like to make a makro, wich goes through all of them and hyperlinks the document with to the cells with matching name.
Im thinking about something like getting the name from the cell, and inserting that to the address of the hyperlink, but don't know how.
Sub hyperlinks()
Worksheets(Worksheets.Count).Select
Dim nev As String
nev = "L:\BC-Development\08_R_BCX31\Projects\RED - 1525, 1555 - BCD31\Specifications\156727.doc"
ActiveCell(A2).Select
ActiveCell.Hyperlink.Add Anchor:=Selection, Address:="", SubAddress:=nev
End Sub
this is a code i wrote, to test if its even possible to use a string to give a path to a hyperlink, but doesn't seem to work.
Anyone with any idea?
Thank you!
I have a sheet filled with around 100 rows of data. In each row the first cell has a six digit long number in it, and there is a folder, with word files, with the same name for each and every one.
I would like to make a makro, wich goes through all of them and hyperlinks the document with to the cells with matching name.
Im thinking about something like getting the name from the cell, and inserting that to the address of the hyperlink, but don't know how.
Sub hyperlinks()
Worksheets(Worksheets.Count).Select
Dim nev As String
nev = "L:\BC-Development\08_R_BCX31\Projects\RED - 1525, 1555 - BCD31\Specifications\156727.doc"
ActiveCell(A2).Select
ActiveCell.Hyperlink.Add Anchor:=Selection, Address:="", SubAddress:=nev
End Sub
this is a code i wrote, to test if its even possible to use a string to give a path to a hyperlink, but doesn't seem to work.
Anyone with any idea?
Thank you!