i created 5 file and have a problem to read that file
this is my coding, thanks
[CODE=vb]Public Function ReadTextFileCon tentUsingFSO(By Val sFileName As String) As String
Dim fs As FileSystemObjec t
Dim ts As TextStream
Dim strText As String
Dim fnum As String
Dim Ssvr As String
Set fs = New FileSystemObjec t
'To Read
If fs.FileExists(s FileName) Then
Set ts = fs.OpenTextFile (sFileName)
Do While Not ts.AtEndOfStrea m
strText = strText & ts.ReadLine & vbCrLf
Loop
ts.Close
End If
fnum = strText
Set ts = Nothing
Set fs = Nothing
Ssvr = fnum
checkStatus (Ssvr)
End Function[/CODE]
this is my coding, thanks
[CODE=vb]Public Function ReadTextFileCon tentUsingFSO(By Val sFileName As String) As String
Dim fs As FileSystemObjec t
Dim ts As TextStream
Dim strText As String
Dim fnum As String
Dim Ssvr As String
Set fs = New FileSystemObjec t
'To Read
If fs.FileExists(s FileName) Then
Set ts = fs.OpenTextFile (sFileName)
Do While Not ts.AtEndOfStrea m
strText = strText & ts.ReadLine & vbCrLf
Loop
ts.Close
End If
fnum = strText
Set ts = Nothing
Set fs = Nothing
Ssvr = fnum
checkStatus (Ssvr)
End Function[/CODE]
Comment