0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

VBA 覚書

Last updated at Posted at 2016-05-11

配列

Dim 変数名(インデックス最大値) As データ型
' 値の代入
変数名(0) = 値1
変数名(1) = 値2
変数名(2) = 値3
.
.
.
.
.
.

' 値の取得
変数名(インデックス)

コレクション

Dim 変数名 As New Collection
' 値の代入
変数名.Add 値1, キー1
変数名.Add 値2, キー2
変数名.Add 値3, キー3
.
.
.
.
.
.

' 値の取得
変数名(キー)

Win32API

' 指定したミリ秒間、処理を停止する。
Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Sleep ミリ秒

' 指定したミリ秒後に処理を実行する。
Declare Function GetTickCount Lib "kernel32" () As Long
Dim StartTime As Long

StartTime = GetTickCount

Do While GetTickCount - StartTime < ミリ秒
   DoEvents
Loop

Win32API を使用しないで処理を待機する

Application.Wait Now + TimeValue("00:00:01")

キーストロークの自動化

SendKeys キー文字列, True
0
2
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
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?