F
Fan924
Why does this hang up? It works on 16k files. Not on 32k and above. It
loads about 200 lines and then seems go get stuck in a loop.
Dim FileType As String
If FileType = "bin" Then
Const ForReading = 1, ForWriting = 2, ForAppending = 3
Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
Dim fs, f, ts, s
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile(FileName)
Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault)
ColumnCount = 3
RowCount = 2
Do While ts.atendofstream = False
Hexbyte = Asc(ts.Read(1))
Cells(RowCount, ColumnCount) = Hex(Hexbyte)
RowCount = RowCount + 1
Loop
ts.Close
MsgBox "bin"
Else
End If
End Sub
loads about 200 lines and then seems go get stuck in a loop.
Dim FileType As String
If FileType = "bin" Then
Const ForReading = 1, ForWriting = 2, ForAppending = 3
Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
Dim fs, f, ts, s
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile(FileName)
Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault)
ColumnCount = 3
RowCount = 2
Do While ts.atendofstream = False
Hexbyte = Asc(ts.Read(1))
Cells(RowCount, ColumnCount) = Hex(Hexbyte)
RowCount = RowCount + 1
Loop
ts.Close
MsgBox "bin"
Else
End If
End Sub