Public Function FileExist(ByRef inFile As String) As Boolean
'*****************************/
' Fonction qui renvoi si fichier existant /
'*****************************/
On Error Resume Next
Let FileExist = CBool(FileLen(inFile) + 1)
End Function
sub ouvrirfichier()
Dim classeur1 As Workbook, classeur 2 as workbook
Dim nom1 As String, nom2 as string
Dim chemin As String
nom1 = "1234567899_67891234_5.txt"
nom2= "partiefixenom2_partievariablenom2.txt"
Chemin = "chemin\a\suivre\"
If FileExist(chemin & nom1) Then
Set classeur1 = Workbooks.Open(chemin & nom1)
end if
If FileExist(chemin & nom2) Then
Set classeur2 = Workbooks.Open(chemin & nom2)
end if
end sub