|

楼主 |
发表于 2018-1-25 13:20
|
显示全部楼层
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
感谢大神!代码标红的地方我目前还没学到,我正在百度学习!!!
Public a, b, c, d, e, f, i, j As Integer, s As New Collection, kk, l, Savetime As Single
Private Sub CommandButton1_Click()
b = 0
If j < 1 Then
For i = 1 To 120
s.Add i
Next
Slide2.Label3.Caption = ""
End If
Do While True
a = s(Int(Rnd * s.Count + 1)): Label1.Caption = a
c = s(Int(Rnd * s.Count + 1)): Label2.Caption = c
d = s(Int(Rnd * s.Count + 1)): Label3.Caption = d
e = s(Int(Rnd * s.Count + 1)): Label6.Caption = e
f = s(Int(Rnd * s.Count + 1)): Label7.Caption = f
Savetime = Timer
While Timer < Savetime + 0.005
DoEvents
Wend
If b = 1 Then Exit Do
Loop
End Sub |
|