D deni29 XLDnaute Junior 25 Avril 2006 #1 Bonjour à tous, En lancant une macro, je souhaiterai savoir si un fichier nommé 'xxxx.xls' existe dans un dossier 'YYYY'. @+ Deni29
Bonjour à tous, En lancant une macro, je souhaiterai savoir si un fichier nommé 'xxxx.xls' existe dans un dossier 'YYYY'. @+ Deni29
Hervé XLDnaute Barbatruc 25 Avril 2006 #2 bonjour deni peut etre comme ceci : Dim toto Set toto = CreateObject('Scripting.FileSystemObject') If toto.FileExists('c:\\\\\\\\yyyy\\\\\\\\xxxx.xls') Then MsgBox 'fichier existant.' Else MsgBox 'fichier non existant.' End If Cliquez pour agrandir... salut Message édité par: hervé, à: 25/04/2006 14:29 Vote positif 0 Vote négatif
bonjour deni peut etre comme ceci : Dim toto Set toto = CreateObject('Scripting.FileSystemObject') If toto.FileExists('c:\\\\\\\\yyyy\\\\\\\\xxxx.xls') Then MsgBox 'fichier existant.' Else MsgBox 'fichier non existant.' End If Cliquez pour agrandir... salut Message édité par: hervé, à: 25/04/2006 14:29
D Deni29 Guest 25 Avril 2006 #3 Existance d'un Fichier Bonjour Hervé, Merci pour cette solution, cela fonctionne trés bien. @+ deni29 Vote positif 0 Vote négatif
Existance d'un Fichier Bonjour Hervé, Merci pour cette solution, cela fonctionne trés bien. @+ deni29
D Deni29 Guest 25 Avril 2006 #4 Existance d'un Fichier Bonjour Hervé, Merci pour cette solution, cela fonctionne trés bien. @+ deni29 Vote positif 0 Vote négatif
Existance d'un Fichier Bonjour Hervé, Merci pour cette solution, cela fonctionne trés bien. @+ deni29