Sub Clients_File_Format_Process()
'
' Declaration of variables
Dim ligne As Integer
Dim File_Name As String
Dim File_Location As String
Dim Client_Number As Long
Dim Client_Quantity As Integer
' Initialize of Data
Client_Quantity = 0
ligne = 12
Cells(ligne, 2).Select
File_Location = Cells(ligne, 5).Text
File_Name = Cells(ligne, 7).Text
Client_Number = Cells(ligne, 2).Text
' Check the existence of a directory
Do While Len(File_Location) > 0
If Len(Dir(File_Location, vbDirectory)) = 0 Then
' 3 = red
Cells(ligne, 8).Interior.ColorIndex = 3
Else
' 10 = green
Cells(ligne, 6).Interior.ColorIndex = 10
'ChDir (File_Location) ' [B]JE N ARRIVE PAS A FAIRE MARCHER CETTE LIGNE POUR ALLEGER LA SUITE[/B]
Cells(ligne, 8).Value = FormatDateTime(FileDateTime(File_Location & File_Name), 4)
Name File_Location & File_Name As File_Location & "TSD_" & Client_Number & "_" & File_Name
End If
ligne = ligne + 1
Client_Quantity = Client_Quantity + 1
File_Location = Cells(ligne, 4).Text
File_Name = Cells(ligne, 5)
Loop
Cells(6, 4).Value = Client_Quantity & " Clients"
End Sub