Einzelnen Beitrag anzeigen
Alt 22.11.2002, 14:10   #7
Seidl
Veteran
 
Registriert seit: 10.01.2001
Beiträge: 478


Standard

Da habt ihr wohl einen etwas eigenartigen VBA-Code gehabt.
Ich habe die Sache gerade versucht und das File war praktisch sofort eingelesen.
Im Anhang findet ihr mein Testmatrix-File.

Hier mein Code:


Sub Makro1()
Const ForReading = 1, ForWriting = 2, ForAppending = 3
Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
Dim FileSys, File, TextStream, strLine
Dim arrLines(372, 372) As String
Dim SplitLine As Variant, Part As Variant
Dim X As Long, Y As Long
Set FileSys = CreateObject("Scripting.FileSystemObject")
Set File = FileSys.GetFile("c:\Matrix.txt")
Set TextStream = File.OpenAsTextStream(ForReading, TristateUseDefault)
X = 0
Do While Not TextStream.AtEndOfStream
strLine = TextStream.ReadLine
SplitLine = Split(strLine, ",")
Y = 0
For Each Part In SplitLine
arrLines(X, Y) = Part
Y = Y + 1
Next
X = X + 1
Loop
TextStream.Close
Stop
End Sub
Seidl ist offline   Mit Zitat antworten