Pbl bete mais je vois pas l'erreur

cs_calimero93 Messages postés 29 Date d'inscription vendredi 14 mars 2003 Statut Membre Dernière intervention 10 décembre 2004 - 3 juin 2004 à 09:05
cs_calimero93 Messages postés 29 Date d'inscription vendredi 14 mars 2003 Statut Membre Dernière intervention 10 décembre 2004 - 3 juin 2004 à 10:21
voila mon algo :

Public tablCD(1 To 9) As String
Public tablhd(1 To 9) As String

Public Function Listcd() As Boolean
On Error GoTo listcd_Error

tablCD(1) = "e:\david\installation cogemag\install en vb\fichiers\bat"
tablCD(2) = "e:\david\installation cogemag\install en vb\fichiers\file"
tablCD(3) = "e:\david\installation cogemag\install en vb\fichiers\food1"
tablCD(4) = "e:\david\installation cogemag\install en vb\fichiers\net"
tablCD(5) = "e:\david\installation cogemag\install en vb\fichiers\Preparation disquette"
tablCD(6) = "e:\david\installation cogemag\install en vb\fichiers\raccourci"
tablCD(7) = "e:\david\installation cogemag\install en vb\fichiers\retaildd"
tablCD(8) = "e:\david\installation cogemag\install en vb\fichiers\TPV_DOS"
tablCD(9) = "e:\david\installation cogemag\install en vb\fichiers\windows"

Listcd = True

On Error GoTo 0
Exit Function

listcd_Error:

MsgBox "Erreur " & Err.Number & " (" & Err.Description & ") dans la fonction ListCD de Module Lstfichiers"

End Function

Public Function ExploreFolder(fld As Folder) As Boolean

On Error GoTo ExploreFolder_Error

Frmanalyse.LstCD.AddItem fld.Path

Dim f As File
For Each f In fld.Files
Frmanalyse.LstCD.AddItem f.Path
Next

' Traite les sous-dossiers
Dim fld1 As Folder
For Each fld1 In fld.SubFolders
ExploreFolder fld1
Next

On Error GoTo 0
Exit Function

ExploreFolder_Error:

MsgBox "Erreur " & Err.Number & " (" & Err.Description & ") dans la fonction ExploreFolder de Module Lstfichiers"
End Function

Public Function Listhd() As Boolean
On Error GoTo listhd_Error

'tablhd(1) = "c:\bat"
'tablhd(2) = "c:\file"
'tablhd(3) = "c:\file3"
tablhd(4) = "c:\food1"
'tablhd(5) = "c:\food2"
'tablhd(6) = "c:\food3"
'tablhd(7) = "c:\net"
'tablhd(8) = "c:\retaildd"

Listhd = True

On Error GoTo 0
Exit Function

listhd_Error:

MsgBox "Erreur " & Err.Number & " (" & Err.Description & ") dans la fonction Listhd de Module Lstfichiers"

End Function

Public Function ExploreFolderbis(fldr As Folder) As Boolean

On Error GoTo ExploreFolderbis_Error

Frmanalyse.LstHD.AddItem fldr.Path

Dim fl As File
For Each fl In fldr.Files
Frmanalyse.LstHD.AddItem fl.Path
Next

' Traite les sous-dossiers
Dim fldr1 As Folder
For Each fldr In fldr1.SubFolders
ExploreFolderbis fldr1
Next

On Error GoTo 0
Exit Function

ExploreFolderbis_Error:

MsgBox "Erreur " & Err.Number & " (" & Err.Description & ") dans la fonction ExploreFolder de Module Lstfichiers"

End Function

il y a 2 partie quasi identique pourtant la 2eme partie ne marche pas, elle liste bien le 1er repertoire mais pas les sous rep
daniel lopes

1 réponse

cs_calimero93 Messages postés 29 Date d'inscription vendredi 14 mars 2003 Statut Membre Dernière intervention 10 décembre 2004
3 juin 2004 à 10:21
ca y est j'ai trouver mon erreur
0
Rejoignez-nous