Dim Fsys As New Scripting.FileSystemObject, monfic As TextStream
'si le fichier n'existe pas :
Set monfic = Fsys.CreateTextFile("E:\METHODES\TMS\", True)
'...
'...
'...
monfic.Close
'si le fichier existe déjà
Set monfic = Fsys.OpenTextFile("E:\METHODES\TMS\" & essai & ".txt", 8)
'...
'...
'...
monfic.Close