当前位置 主页 > 澳门银河备用网址 >

谁能用vb僚佐做壹个1到120号遂机的,不重骈的吧

  

  Dim t As String, k As Long, zs As Long

  Private Sub Command1_Click()

  Dim n As Long, j As Long, s As String, b() As String, tt As String

  k=k + 1

  If k > zs Then

  MsgBox "至多不得不吧嗒" & zs & "次。"

  Exit Sub

  End If

  Randomize

  n=Rnd(99999) * (zs - k)

  b()=Split(t, ",")

  s=b(n) & ","

  tt="第【" & Format(k, "000") & "】次吧嗒中奖品号码为:" & b(n)

  If Len(Text1) > 0 Then

  Text1=Text1 & vbCrLf & tt

  Else

  Text1=tt

  End If

  Text1.SelStart=Len(Text1) - Len(tt)

  t=Replace(t, s, "")

  Debug.Print s; "=="; t

  End Sub

  Private Sub Form_Load()

  zs=120

  Command1.Caption="吧嗒奖品"

  Text1=""

  ' Text1.MultiLine=True

  Dim j As Long

  t="[001],"

  For j=2 To zs

  t=t & "[" & Format(j, "000") & "],"

  Next

  End Sub

  你此雕刻个才什分,编个以次最微一少半个小时