|
やったことないんでこれ以上解りません。
Dim st1 As Variant, st2 As Variant, st3 As Variant
Sub aaa()
st1 = Now() + TimeValue("00:00:00")
st2 = Now() + TimeValue("00:00:05")
st3 = Now() + TimeValue("00:00:10")
Application.OnTime st1, "マクロ1"
Application.OnTime st2, "マクロ2"
Application.OnTime st3, "マクロ3"
End Sub
Sub マクロ1()
On Error GoTo errPrc
MsgBox "マクロ1"
Exit Sub
errPrc:
Err.Clear
On Error GoTo 0
MsgBox "エラー"
Application.OnTime st2, "マクロ" & i, , False
Application.OnTime st3, "マクロ3", , False
End Sub
Sub マクロ2()
On Error GoTo errPrc
MsgBox "マクロ2"
Sheets(100).Select
Exit Sub
errPrc:
Err.Clear
On Error GoTo 0
MsgBox "エラー"
Application.OnTime st3, "マクロ3", , False
End Sub
Sub マクロ3()
On Error Resume Next
MsgBox "マクロ3"
End Sub
|
|