Prova così:
codice:Dim FileName As String Dim Riga As String Dim Cont1 As Long Dim Cont2 As Long FileName = "C:\DOC.TXT" Open FileName For Input As #1 Do Until EOF(1) Line Input #1, Riga Cont1 = (Cont1 + 1&) Cont2 = (Cont2 + Len(Riga) + 2&) If (Cont1 > 2&) Then '...esclude le prime 2 righe If (Cont2 <> (FileLen(FileName) + 2&)) Then '...esclude l'ultima riga MsgBox Riga End If End If Loop Close #1![]()

Rispondi quotando