Sub Bouton43_Cliquer()
'parcourt des lignes 8 à 133
For Lig = 8 To 133
If Not IsEmpty(Cells(Lig, 5)) Then
'création du nom du fichier avec path complet. je suppose
FichierATester = [M2] + Cells(Lig, 5) + Cells(Lig, 13)
'coloration des cellules
Cells(Lig, 6).Font.ColorIndex = 0
Cells(Lig, 11).Interior.ColorIndex = 2
Set fs = CreateObject("Scripting.FileSystemObject")
On Error Resume Next 'si il y a une erreur, la macro va ignorer la commande et passer à la ligne suivante
Set F = fs.GetFile(FichierATester)
Cells(Lig, 12).Value = F.DateLastModified
Else
'sinon la ligne est vide
Cells(Lig, 6).Font.ColorIndex = 3
Cells(Lig, 12).Interior.ColorIndex = 3
End If
Next Lig
End Sub