Link to file in subdirectory
Folder = "\myDir"
Extension = "apj"
RowCount = 1
Do While Range("A" & RowCount) < ""
MyFile = Folder & "\" & Range("A" & RowCount) & _
"." & "Extension"
Range("B" & RowCount).Hyperlinks.Add _
Anchor:=Selection, _
Address:=MyFile, _
TextToDisplay:=MyFile
RowCount = RowCount + 1
Loop
"Matthieu B." wrote:
Hi all,
I am a Excel & VBA newbie and I have to do this kind of script :
in column A, I have a liste of reference. Example : "R-AD-H-F"
in a directory, call it '\myDir\', I have many subdirectories whith a lot
of files. File format is, for example, "R AD H F.APJ"
= I need to put in column B a list of link to file in '\myDir\' for each
reference in column A
Any ideas ?
Thanks.
Best regards,
Matthieu.
|