![]() |
#2
风吹过b2012-12-27 14:08
|

Dim AssStations() As String
Private Sub Form_Load()
Dim Tmp1, Tmparray1
ReDim AssStations(0) As String
If Dir(App.Path & "\adult.dat") <> "" Then
Open App.Path & "\adult.dat" For Input As #1
aLista.Clear
While Not EOF(1)
Line Input #1, Tmp1
If Trim(Tmp1) <> "" Then
Tmparray1 = Split(Tmp1, "||>")
ReDim Preserve AssStations(UBound(AssStations) + 1) As String
If Tmparray1(0) <> "" Then
AssStations(UBound(AssStations) - 1) = Trim(Tmparray1(1)) '下标越界,错误提示来自这一行。怎么解决
aLista.AddItem Trim(Tmparray1(0))
End If
End If
Wend
Close #1
End If
End Sub
Private Sub Form_Load()
Dim Tmp1, Tmparray1
ReDim AssStations(0) As String
If Dir(App.Path & "\adult.dat") <> "" Then
Open App.Path & "\adult.dat" For Input As #1
aLista.Clear
While Not EOF(1)
Line Input #1, Tmp1
If Trim(Tmp1) <> "" Then
Tmparray1 = Split(Tmp1, "||>")
ReDim Preserve AssStations(UBound(AssStations) + 1) As String
If Tmparray1(0) <> "" Then
AssStations(UBound(AssStations) - 1) = Trim(Tmparray1(1)) '下标越界,错误提示来自这一行。怎么解决
aLista.AddItem Trim(Tmparray1(0))
End If
End If
Wend
Close #1
End If
End Sub

只有本站会员才能查看附件,请 登录
[ 本帖最后由 ymhy12345 于 2012-12-27 13:50 编辑 ]