请高手赐教随机数ppt的问题
在ppt中怎样把随机数组用for each返回 label 或textbox中,并用动画滚动后,按按钮停止Private Sub Command1_Click()
Dim S(6) As Integer
Dim I, j As Integer
Label1.Caption = ""
For I = 1 To UBound(S)
S(I) = Int((Rnd * 20) + 1)
For j = I - 1 To LBound(S) Step -1
If S(I) = S(j) Then
I = I - 1: Exit For
End If
Next j
Next I
For I = 1 To UBound(S)
Label1.Caption = Label1.Caption & " " & S(I)
Next I
End Sub
怎样让6个数进6个label 或textbox而不是6个进一个
还有谁能注册或显出下面随机数ppt的vba代码 Dim PauseTime, Start, Finish, TotalTimePrivate, a, b, c
Sub abc1()
PauseTime = Int((1 * Rnd) + 1) '
Start = Timer '
Do While Timer < Start + PauseTime
DoEvents '
a = Int((9 * Rnd) + 1)
Txt2.Text = a
b = Int((9 * Rnd) + 1)
Txt3.Text = b
c = Int((9 * Rnd) + 1)
Txt1.Text = c
Loop
End Sub
???????????? 谢谢jack0421,txt改textbox后成功,但时间短,想一直滚动按停止按钮停止
页:
[1]