|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
可能是公式的原因,更改后经测试没有这种延时状况了.
- Private Sub CommandButton1_Click()
- Dim d, i, n$
- If CommandButton1.Caption = "开始" Then
- CommandButton1.Caption = "停止"
- i = Sheet2.Range("b65536").End(3).Row
- x = True
- Do While x = True
- Set d = CreateObject("Scripting.Dictionary")
- Do
- n = Sheet2.Cells(Int(Rnd * i) + 1, 2)
- d(n) = ""
- Loop While d.Count <> i
- Range("b3").Resize(d.Count) = Application.Transpose(d.keys)
- DoEvents
- Loop
- Else
- CommandButton1.Caption = "开始"
- x = False
- End If
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|