如何用vb读取矩阵中对应行和列所对应的值。
发布网友
发布时间:2022-05-15 06:20
我来回答
共2个回答
热心网友
时间:2023-10-11 12:34
a(i,j)即可
i的行数
j是列数
热心网友
时间:2023-10-11 12:34
’自己修改
Private Sub Command1_Click()
Dim i As Long, row As Long, col As Long, arr
Open "c:\123.txt" For Input As #1
row = 5: col = 3 '设置行号和列号
arr = Split(StrConv(InputB(LOF(1), 1), vbUnicode), vbNewLine)
Close #1
If row + 1 <= UBound(arr) Then
If col <= Len(arr(row)) Then MsgBox "行号:" & row & ",列号:" & col & "=" & Mid(arr(row - 1), col, 1)
End If