Hi
This will get you started:
Sub make_hyperlinks()
Const FLD = "D:\Work\Test\" 'don't forget the final \!!!
Dim rngFolders As Range, rngEachFolder As Range
Set rngFolders = Range("A4:A" & Cells(Rows.Count, "A").End(xlUp).Row)
For Each rngEachFolder In rngFolders
If Len(Dir(FLD & rngEachFolder & "*", vbDirectory)) > 0 Then
ActiveSheet.Hyperlinks.Add anchor:=rngEachFolder, Address:=FLD & Dir(FLD & rngEachFolder & "*", vbDirectory)
End If
Next rngEachFolder
End Sub
The Constant FLD is where you initially start your search for the folders. Potentially you could loop thru several foilders if you want. Note that I find Dir using vbDirectory argument to be rather slow.
Bookmarks