FileToOpenCAB1_path = Application.GetOpenFilename("Fichiers texte (*.xls), *.xls") 'On preleve le chemin d'acces du fichier a charger
FileToOpenCAB1_repert = Mid(ThisWorkbook.FullName, 1, InStr(1, ThisWorkbook.FullName, ThisWorkbook.Name, 1) - 1) 'On preleve le repertoire du fichier principale
FileToOpenCAB1_long = Mid(FileToOpenCAB1_path, InStrRev(FileToOpenCAB1_path, "\") + 1)
FileToOpenCAB1_court = Left(FileToOpenCAB1_long, InStrRev(FileToOpenCAB1_long, ".") - 1)
FileToOpenCAB1_xls = FileToOpenCAB1_repert & FileToOpenCAB1_court & ".xls"
FileToOpenCAB1_xls_long = FileToOpenCAB1_xls & ".xls"
If ouvertfichier(FileToOpenCAB1_xls) = True Then
MsgBox "Fichier ouvert"
Else
MsgBox "fichier fermé"
End If
End Sub