请问vb里面next 没有for 是怎么回事?

2025-03-24 14:05:00
推荐回答(1个)
回答1:

Private Sub Command1_Click()
    Dim k%
    For k = List1.ListCount - 1 To 0 Step -1
        If List1.Selected(k) = True Then
        End If
    Next k
End Sub
Private Sub Command2_Click()
    Dim k%
    Text1 = "已选中的城市有:"
         For k = 0 To List2.ListCount - 1 Step 1 '
         Text1 = Text1.Text & " " & List2.List(k)
    Next k
End Sub