Sub CreateHyperLink()
Dim fd As Object, fPath As String, fName As String, cel As Range
Set cel = Application.InputBox("Select a cell", "Add Link to File", , , , , , 8)
Set fd = Application.FileDialog(msoFileDialogFilePicker)
With fd
.InitialFileName = Environ("USERPROFILE") & "\" 'default folder path - MUST end with[COLOR=#ff0000] [B]\[/B][/COLOR]
.AllowMultiSelect = False
.Title = "Please select a file."
.Filters.Clear
If .Show = True Then
fPath = fd.SelectedItems(1)
fName = Mid(fPath, InStrRev(fPath, "") + 1, 9999)
Else
Exit Sub
End If
End With
cel.Hyperlinks.Add Anchor:=cel, Address:=fPath, TextToDisplay:=fName
End Sub