Option Explicit
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target(1, 1).Address = "$A$4" Then
FileDialog
End If
End Sub
Private Function FileDialog() As String
'Requires reference to Microsoft Office 12.0 Object Library.
Dim fDialog As Office.FileDialog
Dim varFile As Variant
'Set up the File Dialog.
Set fDialog = Application.FileDialog(msoFileDialogFilePicker)
With fDialog
'Do not allow user to make multiple selections in dialog box.
.AllowMultiSelect = False
'Set the title of the dialog box.
.Title = "Please select one or more files"
'Clear out the current filters, and add our own.
.Filters.Clear
.Filters.Add "Access Databases", "*.XL*" 'edit for desired file types
.Filters.Add "All Files", "*.*"
If .Show = True Then
'add code here for what to do with selected file name
Else
MsgBox "You clicked Cancel in the file dialog box."
End If
End With
End Function