Sub cudang()
If Cells(10, 1) - Cells(10, 2) = 0 Then
If Cells(2, 3) = "甲" Then
Cells(12, 2) = Cells(12, 2) + Cells(2, 6)
Cells(12, 3) = Cells(12, 3) + Cells(2, 7)
ElseIf Cells(2, 3) = "乙" Then
Cells(13, 2) = Cells(13, 2) + Cells(2, 6)
Cells(13, 3) = Cells(13, 3) + Cells(2, 7)
ElseIf Cells(2, 3) = "丙" Then
Cells(14, 2) = Cells(14, 2) + Cells(2, 6)
Cells(14, 3) = Cells(14, 3) + Cells(2, 7)
ElseIf Cells(2, 3) = "丁" Then
Cells(15, 2) = Cells(15, 2) + Cells(2, 6)
Cells(15, 3) = Cells(15, 3) + Cells(2, 7)
End If
Else
Cells(12, 2) = 0
Cells(12, 3) = 0
Cells(13, 2) = 0
Cells(13, 3) = 0
Cells(14, 2) = 0
Cells(14, 3) = 0
Cells(15, 2) = 0
Cells(15, 3) = 0
End If
End Sub
Public Sub mymacro()
Application.OnTime TimeValue("10:10:00"), "cudang"
Application.OnTime TimeValue("10:12:00"), "cudang"
Application.OnTime TimeValue("10:14:00"), "cudang"
Application.OnTime Now + TimeValue("00:00:15"), "mymacro"
Cells(1, 1) = Cells(1, 1) + 1
End Sub
Private Sub auto_open()
Call mymacro
End Sub
为什么到时间会计算好多次,有没有高手给看下啊,真搞不懂为什么
求高手给看看applicationontime到时间为什么会计算好多次
答案:2 悬赏:80 手机版
解决时间 2021-02-26 10:42
- 提问者网友:遁入空寂
- 2021-02-26 03:29
最佳答案
- 五星知识达人网友:爱难随人意
- 2021-02-26 04:13
Public Sub mymacro()
Application.OnTime TimeValue("10:10:00"), "cudang"
Application.OnTime TimeValue("10:12:00"), "cudang"
Application.OnTime TimeValue("10:14:00"), "cudang"
Application.OnTime Now + TimeValue("00:00:15"), "mymacro"
Cells(1, 1) = Cells(1, 1) + 1
End Sub
把上面这一段代码修改成下面的这样到时就计算一次
Public Sub mymacro()
Application.OnTime TimeValue("10:10:00"), "cudang"
Application.OnTime Now + TimeValue("00:00:15"), "mymacro"
Cells(1, 1) = Cells(1, 1) + 1
End Sub
Application.OnTime TimeValue("10:10:00"), "cudang"
Application.OnTime TimeValue("10:12:00"), "cudang"
Application.OnTime TimeValue("10:14:00"), "cudang"
Application.OnTime Now + TimeValue("00:00:15"), "mymacro"
Cells(1, 1) = Cells(1, 1) + 1
End Sub
把上面这一段代码修改成下面的这样到时就计算一次
Public Sub mymacro()
Application.OnTime TimeValue("10:10:00"), "cudang"
Application.OnTime Now + TimeValue("00:00:15"), "mymacro"
Cells(1, 1) = Cells(1, 1) + 1
End Sub
全部回答
- 1楼网友:不甚了了
- 2021-02-26 05:44
程序:\ ? ? \ c:\ locas \ temp \ .
这个应用程序要求运行以终止它在一个不寻常的方式。
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯