0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

定期的にキー入力を行うVBA(備忘)

Last updated at Posted at 2022-03-03

定期的にキー入力を行うVBA(備忘)

10秒に1回、指定したキーを入力するマクロ

Sub Timer_Event()
   'Ctrlボタンを押下
   SendKeys "^"
   
   '次にタイマーを実行するのを現在より10秒後にセット
   next_time = Now() + TimeValue("00:00:10")
   
   'タイマーでは自分自身を呼び出し、繰り返し処理させる
   Application.OnTime EarliestTime:=next_time, Procedure:="Timer_Event"
   
End Sub

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?