2个回答
展开全部
百度一下吧
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
加另一个list用于显示结果
Dim A() As Integer
Private Sub Command1_Click()
For j = 1 To List1.ListCount
ReDim Preserve A(j) As Integer
A(j) = List1.List(j - 1)
Next
For i = 1 To List1.ListCount - 1
For j = 1 To List1.ListCount - 1
If A(j) < A(j + 1) Then
temp = A(j + 1)
A(j + 1) = A(j)
A(j) = temp
End If
Next j
Next i
For j = 1 To List1.ListCount
List2.AddItem A(j)
Next
End Sub
Dim A() As Integer
Private Sub Command1_Click()
For j = 1 To List1.ListCount
ReDim Preserve A(j) As Integer
A(j) = List1.List(j - 1)
Next
For i = 1 To List1.ListCount - 1
For j = 1 To List1.ListCount - 1
If A(j) < A(j + 1) Then
temp = A(j + 1)
A(j + 1) = A(j)
A(j) = temp
End If
Next j
Next i
For j = 1 To List1.ListCount
List2.AddItem A(j)
Next
End Sub
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询