Laufzeitfehler '5' - ungültiger Prozeduraufruf
06.09.2005 12:54:51
Ralf
habe in einem Makro folgenden Fehler - wer kann helfen:
Dim vAct As Variant
Dim iRow As Integer, iCol As Integer
Dim sTxt As String, sTmp As String
iRow = 8
Rows(iRow & ":" & Rows.Count).ClearContents
Close
Open "Y:\.... \UMS.txt" For Input As #1
Do Until EOF(1)
Line Input #1, sTxt
Do While Len(sTxt) > 1
iCol = 0
=> sTmp = Left(sTxt, InStr(sTxt, vbLf) - 1) => UNGÜLTIGER PROZEDURAUFRUF ODER UNGÜLTIGES ARGUMENT
Do While Len(sTmp) > 1
iCol = iCol + 1
vAct = Left(sTmp, InStr(sTmp, Chr(124)) - 1)
If InStr(vAct, ",") Then
vAct = WorksheetFunction.Substitute(vAct, ",", ".")
End If
Cells(iRow, iCol).Value = vAct
sTmp = Right(sTmp, Len(sTmp) - InStr(sTmp, Chr(124)))
Loop
sTxt = Right(sTxt, Len(sTxt) - InStr(sTxt, vbLf))
iRow = iRow + 1
Loop
Loop
Close