Private Sub Command1 Click)
Const n=9 '总人数
Dim b(1 Ton) As Integer
Dim k As Integer, i As Integer, p As Integer, cnt As Integer, pre. p As Integer
k =Val(Text1. Text)
For i= 1 Ton
b(i)=iModn+1
Next i
p = n:i = 0:cnt=0
Do While i<n
pre_p = p
p= ①
cnt=cnt+1
If cnt=k Then
List1. AddItem Str(p)
b(pre_p) ②
cnt=0
i= i+1
End If
Loop
End Sub