Sub CompteLigne()
Dim NbLigne As Long
Dim intFic As Integer
Dim strLigne As String
Dim MaLigneExcel As Long
Dim CheminFichier As String
MaLigneExcel = 2
intFic = FreeFile
Do While Cells(MaLigneExcel, 3) <> ""
CheminFichier = Cells(MaLigneExcel, 3)
Open CheminFichier For Input As intFic
While Not EOF(intFic)
Line Input #intFic, strLigne
NbLigne = NbLigne + 1
Wend
Close intFic
Cells(MaLigneExcel, 4) = NbLigne
MaLigneExcel = MaLigneExcel + 1
Loop
End