You want to list, and create a hyperlink to, a list of files of a certain type.
Resolution
Sub List_Files()
'Declare your variables
Dim I, J, c, fPath, fExt
'Get your search extension
fExt = InputBox("Please enter the extension for the files you request:", _
'Get your search path
fPath = InputBox("Please enter the path and directory you wish to search", _
'Select the first cell of your worksheet
ActiveSheet.Range("A1").Select
'Get your first file name and create it's hyperlink
Selection.Value = Dir(fPath & "*." & fExt)
Selection.Hyperlinks.Add Anchor:=Selection, Address:= _
'Cycle through the directory listing the remainder of the files
I = Dir
Set c = Range("A2")
Do While I <> ""
c.Select
c.Value = I
I = Dir
Selection.Hyperlinks.Add Anchor:=Selection, Address:= _
Set c = c.Offset(1, 0)
Loop
'Let your user know how many files were added to the list
J = c.Offset(-1, 0).Row
MsgBox "There were " & J & " files added to this list"
Range("A1").Select
End Sub
Back.