Hi
How can I inport all the file Inpoort.txt in vb6?
tanks :twisted:

You need to use FileSystemObject.

Dim TS As TextStream
Dim strLine As String
Dim FSO As New FileSystemObject
     Set FSO = Nothing
     Set FSO = New FileSystemObject
     FSO.OpenTextFile ("C:\Mytextfile.txt")
     Set TS = FSO.OpenTextFile("C:\Mytextfile.txt")
     While Not TS.AtEndOfStream = True
          strLine = Trim(TS.ReadLine)
          Debug.Print Trim(strLine)
     Wend
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.