|
- Dim arr(2), k, r
- Private Sub Command1_Click()
- If Command1.Caption = "停止" Then Command1.Caption = "抽出" Else Command1.Caption = "停止"
-
- If arr(0) = 0 Then
- For i = 0 To 2
- arr(i) = i + 1
- Next
- MsgBox "3个初始化完成"
- End If
-
- Randomize
- While Command1.Caption = "停止"
- r = Int(Rnd * (3 - k)) + k
- If Rnd > 0.5 Then
- TextBox1.Text = "000"
- Else
- TextBox1.Text = Right("00" & arr(r), 3)
- End If
- DoEvents
- Wend
-
- If Command1.Caption = "抽出" Then
- t = arr(r): arr(r) = arr(k): arr(k) = t: k = k + 1
- TextBox1.Text = Right("00" & t, 3)
- End If
-
- If k > 2 Then
- If Command1.Caption <> "抽出" Then k = 0
- Command1.Caption = Join(arr, "-") & vbLf & "3个已全部抽出" & vbLf & "下一轮"
- Else
- Command1.Caption = Left(Join(arr, "-"), k * 2) & vbLf & "已抽出第 " & k & " 个" & vbLf & "下一个"
- End If
-
- End Sub
- Sub OnSlideShowPageChange()
- Command1.Caption = "开始"
- 打开.Caption = "打开"
- TextBox1.Text = "000"
- End Sub
- Private Sub 打开_Click()
- ActivePresentation.SlideShowWindow.View.GotoSlide (“ ”)
- End Sub
复制代码 打开对应抽取到数字的页面,这里ActivePresentation.SlideShowWindow.View.GotoSlide (“ ”)怎么写啊。求指导啊,谢谢了,急~!
|
|