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

Recommended Answers

All 2 Replies

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)
Be a part of the DaniWeb community

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