Option Explicit
Private Function OpenTextFile() As String
Dim nFileNum As Integer, sText As String
Dim sNextLine As String, lLineCount As Long
nFileNum = FreeFile
Open "C:\daftar_driver.txt" For Input As nFileNum
lLineCount = 1
Do While Not EOF(nFileNum)
Line Input #nFileNum, sNextLine
MsgBox sNextLine 'ini akan membaca file text baris per baris
sNextLine = sNextLine & vbCrLf
sText = sText & sNextLine
Loop
OpenTextFile = sText
Close nFileNum
End Function
Tuesday, June 12, 2012
Membaca File Text Baris Per Baris - Visual Basic 6
Labels:
File-And-Folder