....put in memory as a string or an array of
bytes) everything from the file but the
VbCRLF's?
thank you
------------------
Printable View
....put in memory as a string or an array of
bytes) everything from the file but the
VbCRLF's?
thank you
------------------
------------------Code:Private Sub cmdLoad_Click()
Dim iFile As Integer
Dim lChunk As Long
Dim lFileLen As Long
Dim sChunk As String
Dim sData As String
iFile = FreeFile
Open "C:\TheFile.txt" For Binary Access Read As iFile
lFileLen = LOF(iFile)
lChunk = 64000
While Loc(iFile) < lFileLen
If lChunk + Loc(iFile) > lFileLen Then lChunk = lFileLen - Loc(iFile)
sChunk = Space(lChunk)
Get #iFile, , sChunk
sData = sData & sChunk
Wend
sData = Replace(sData, vbCrLf, "")
Close iFile
End Sub
Aaron Young
Analyst Programmer
[email protected]
[email protected]