|
>更にSheet1のモジュールに
>'==============================================================
>Option Explicit
>Dim WithEvents bk As ThisWorkbook
>'===============================================================
>Sub main()
> Set bk = ThisWorkbook
> bk.timer_set TimeValue("00:00:3")
>End Sub
>'=======================================================================
>Private Sub bk_timejust(ByVal cnt As Long, cancel As Boolean, t_para As Variant)
>'cnt 処理の繰り返し回数
>'cancel trueを指定すると処理終了
>'t_para データ引渡し変数
>このイベント内で呼び出したいプロシジャーにデータを渡します
> Dim a As 足し算
> a.a = cnt
> a.b = cnt
> Call testtest(a)
> If cnt >= 3 Then cancel = True '3回処理したら終了
>End Sub
このSheet1のmainを実行させて確認してください。
|
|