Public Function FileOpen(ByVal sTitle As String, ByVal sFiltre As String) As String
Dim F As New System.Windows.Forms.OpenFileDialog
Dim S As String = String.Empty
With F
.Title = sTitle
.Filter = sFiltre
.ShowDialog()
S = .FileName
End With
F.Dispose()
F = Nothing
Return S
End Function
'exemple d'utilisation :
Dim ShosenFile As String = FileOpen("Choix Fichier", "All files (*.*)|*.*")