<p><strong>Méthode 1 : Fonction Dir</strong></p>
<pre data-code-wrap="vba"><code class="lang-vba">If Dir("C:\chemin\fichier.txt") <> "" Then
MsgBox "Le fichier existe"
End If
</code></pre>
<p><strong>Méthode 2 : FileSystemObject</strong></p>
<pre data-code-wrap="vba"><code class="lang-vba">Dim fso As Object
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FileExists("C:\chemin\fichier.txt") Then
MsgBox "Le fichier existe"
End If
</code></pre>