VB读取txt文件
'读入河流参数,读入断面参数Dim ss As String
Dim t As Long
Dim aa
Dim tot As Long
Open App.Path & "\jilu.txt" For Input As #1
Do While Not EOF(1)
Line Input #1, ss
ss = Trim(ss)
ss = Replace(ss, " ", ",")
ss = Replace(ss, ",,", ",")
aa = Split(ss, ",")
tot = UBound(aa)
If t = 1 Then
'第一行为河流参数
HL = aa(0) '第1列
Q = aa(1) '第2列
NN = aa(2) '第3列
Z(1) = aa(3) '第4列
t = t + 1
Else
If tot = 4 Then
I = aa(0)
L(I) = aa(1)
M(I) = aa(2)
GG(I) = aa(3)
n(I) = aa(4)
t = t + 1
Else
AX(I, M(I)) = aa(0)
GCH(I, M(I)) = aa(1)
End If
End If
Loop
Close #1
我的除了AX 和GCH是二维 其它都是一维的,运行后这两行显示类型不匹配,应该怎么改