Bonjours, j'utilise le code suivant :
Private Sub Command1_Click()
Dim ficprod As String
ficprod = App.Path & "\test.txt"
Set fso = CreateObject("Scripting.FileSystemObject")
Set fp = fso.OpenTextFile(ficprod, 1)
fp.Close
End Sub
Et je souhaite faire un test sur l'objet fp pour savoir si le fichier est fermé ou non.
Car si je fait 2fois fp.close, j'ai une érreure, c'est donc pour éviter ce problème.