Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Address = [J2].Address Then
If [J2] = "" Then F = [J2] Else F = Dir([J2]) ' pas de iif sinon dir se plante
If F = "" Then
With Application.FileDialog(msoFileDialogFilePicker)
.InitialFileName = ThisWorkbook.Path
.InitialView = msoFileDialogViewList
.AllowMultiSelect = False
.ButtonName = "Select"
.Filters.Clear
.Filters.Add "Fichier Crystal", "*.xls"
.Title = "Choix du Fichier Crystal"
If .Show Then
Range("J2") = .SelectedItems(1)
T = Split(Range("J2"), "\")
T(UBound(T)) = "[" & T(UBound(T)) & "]"
T = "='" & Join(T, "\") & "Sheet1'!$B:$K"
ThisWorkbook.Names("Crystal").RefersTo = T
Cancel = True
End If
End With
End If
End If
End Sub