[求助]这个程序(VB)执行后为什么没有重新排序
代码如下,请高手指教,谢谢Option Base 1
Private Sub Command1_Click()
Dim bj() As Variant
Dim bjh() As Variant
Dim cdia() As Variant
Dim i, j, k, imin, t As Variant
bj = Array(8, 7, 3, 12, 6, 5, 4, 9, 1, 2, 3, 11, 12)
cdia = Array(10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130)
For i = LBound(bj) To UBound(bj) - 1
imin = bj(i)
For j = i + 1 To UBound(bj)
jj = bj(j)
If cdia(imin) < cdia(jj) Then
t = imin: imin = jj: jj = t
List1.AddItem bj(j)
End If
Next j
Next i
For i = 1 To UBound(bj)
Print "bj" & i & "=(" & bj(i) & ")"
Next i
End Sub