Public Function IfFileExists(ByVal Fichier As String) As Boolean Dim Resultat As String Resultat = Dir(Fichier, vbNormal) If Resultat <> "" Then IfFileExists = True Else IfFileExists = False End If End Function
j'ai plus simplefichier = dir("c:autoexec.bat")if file <> "" thenmsgbox("ok")elsemsgbox("po la")end iftu px mettre aussi Not fichier = dir("c:autoexec.bat")if not fichier <> "" thenmsgobox("po la")elsemsgbox("la")end if
arf le string est po bon , les commentair accepte po le slach
If Dir$("CheminFichier.ext") <> vbNullString Then'ExisteElse'Existe pasEnd if
fichier = App.Path & "\nomdufichier.ext"verif = Dir(fichier, vbNormal)Si le fichier n'existe pas, verif sera nul.
salut salut,ce code vient de me servir !J'ai installe vb6 hier apres midi et je dois realiser une application et je n'y pas grand chose !merci pour le bout de codechristophe
Se souvenir du profil
Mot de passe oublié ? / Activation de compteCréer un compte
1 875 045 membres 247 nouveaux aujourd'hui 16 153 membres club