Hi I have the Macro below that will search throught a directory and list the .Xls in it. What I am now trying to do with this is to create a hyperlink from the results that will take me right to the spreadsheet?
Is there anything i can easily put in Thanks to anyone that can help
Sub Dirlist()
Dim i As Long
With Application.FileSearch
.NewSearch
' *** Change Folder name to suit ***
.LookIn = "C:\MyDocuments"
.SearchSubFolders = True
Dir (Folder & "\" & Extension)
.Filename = "*.xls*"
If .Execute > 0 Then
For i = 1 To .FoundFiles.Count
Cells(i, 1).Value = Right(.FoundFiles(i), InStr(StrReverse(.FoundFiles(i)), "\") - 1)
Next
End If
End With
End Sub
Is there anything i can easily put in Thanks to anyone that can help
Sub Dirlist()
Dim i As Long
With Application.FileSearch
.NewSearch
' *** Change Folder name to suit ***
.LookIn = "C:\MyDocuments"
.SearchSubFolders = True
Dir (Folder & "\" & Extension)
.Filename = "*.xls*"
If .Execute > 0 Then
For i = 1 To .FoundFiles.Count
Cells(i, 1).Value = Right(.FoundFiles(i), InStr(StrReverse(.FoundFiles(i)), "\") - 1)
Next
End If
End With
End Sub