如果是窗口的计时器,一个任务周期5秒执行,一个任务周期10秒执行,可以这样将计时器间隔设置为1秒,代码为:
Static n1 As Long
n1 = n1 +1
If n1 Mod 5 = 0 Then
执行任务1
ElseIf n1 Mod 10 = 0 Then
执行任务2
End If