|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
- Dim index As Long
- Public Sub 开始滚动()
- index = 2
- StartTimer
- End Sub
- Sub StartTimer()
- NextTime = Now + timeValue("00:00:01")
- Application.OnTime NextTime, "RefreshData"
- End Sub
- Sub 停止滚动()
- On Error Resume Next
- Application.OnTime EarliestTime:=Now + timeValue("00:00:01"), Procedure:="RefreshData", Schedule:=False
- End Sub
- Public Sub RefreshData()
- Dim str As String
- str = Worksheets("数据").Range("B3")
- str = Mid(str, index) & Left(str, index - 1)
- index = index + 1
- [C26] = str
- StartTimer
- End Sub
复制代码 |
|