
VB 如何定义为二维数组
DimbDimaDimsAsStringDimiAsIntegerDimjAsIntegerDimxy()AsIntegerPrivateSubCommand1_Clic...
Dim b
Dim a
Dim s As String
Dim i As Integer
Dim j As Integer
Dim xy() As Integer
Private Sub Command1_Click()
Form1.Cls
Open "f:\1.txt " For Input As #1
Do While Not EOF(1)
Line Input #1, s
Loop
a = Split(s, vbCrLf) '读行
For i = 0 To UBound(a)
b = Split(a(i), ",") ’读取列
'然后怎吗写才能将 a 行 b列中的数据写入到xy()的二位数组中
Close #1
End Sub 展开
Dim a
Dim s As String
Dim i As Integer
Dim j As Integer
Dim xy() As Integer
Private Sub Command1_Click()
Form1.Cls
Open "f:\1.txt " For Input As #1
Do While Not EOF(1)
Line Input #1, s
Loop
a = Split(s, vbCrLf) '读行
For i = 0 To UBound(a)
b = Split(a(i), ",") ’读取列
'然后怎吗写才能将 a 行 b列中的数据写入到xy()的二位数组中
Close #1
End Sub 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |