那应该是你的数组的问题吧,
也就是a(m, n),这需要赋值的,下面是一个实例
Private Sub Command1_Click()
Dim a(5, 5)
'赋值
For m = 0 To 5
For n = 0 To 5
a(m, n) = n
Print a(m, n);
Next
Print
Next
Print
Print
Dim czjl(5, 5) As Boolean '转置过程记录
For m = 0 To 5
For n = 0 To 5
If czjl(m, n) = False Then
tmp = a(m, n) 'a是你需要转置数组
a(m, n) = a(n, m)
a(n, m) = tmp
czjl(m, n) = True
czjl(n, m) = True
End If
Next
Next
'转制以后打印
For m = 0 To 5
For n = 0 To 5
'a(m, n) = n
Print a(m, n);
Next
Print
Next
End Sub