anche tu ha ragione
Dim fSetup As TextStream
x ora ho scritto sto codice
Option Compare Database
Option Explicit
Private Sub FileTxt()
Dim fsSetup As New FileSystemObject
Dim fSetup As TextStream
Dim rstSetup As New ADODB.Recordset
Dim strSql As String
Dim Campi As String
Dim mstrPathSetup As String
Dim codiceRiga As String
Dim ragSoc As String
Dim ragSoc2 As String
mstrPathSetup = app.Path & "\anagra.txt"
Set fSetup = fsSetup.OpenTextFile(mstrPathSetup, ForReading, False)
Do While fSetup.AtEndOfStream <> True
codiceRiga = fSetup.ReadLine
codiceRiga = Mid(riga, 1, 7)
mstrCnDb = fSetup.ReadLine
Loop
fSetup.Close
Set fSetup = Nothing
Set fsSetup = Nothing
Exit Sub
End Sub
puo' andare bene?