1
3

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 5 years have passed since last update.

VBA

Posted at

変数宣言

Dim 変数名 As データ型
データ型 名称 格納できる範囲
Integer 整数型 -32,768 ~ 32,767
Long 長整数型 -2,147,483,648 ~ 2,147,483,647
Single 単精度浮動小数点数型 -3.402823E38 ~ -1.401298E-45(負の値)
1.401298E-45 ~ 3.402823E38(正の値)
Double 倍精度浮動小数点数型 -1.79769313486232E308 ~ -4.94065645841247E-324(負の値)
4.94065645841247E-324 ~ 1.79769313486232E308(正の値)
Currency 通貨型 -922,337,203,685,477.5808 ~ 922,337,203,685,477.00
String 文字列型 最大約20億文字まで
Data 日付型 西暦100 年1月1日~西暦9999年12月31日までの日付と時刻
Byte バイト型 0~255の範囲の単精度の正の数値。8 ビット(1 バイト)
Boolean ブール型 真(True)または偽(False)
Object オブジェクト型 オブジェクト
Variant バリアント型 全てのデータ

※データ型を指定しない場合は自動的にVeriantになる

IF~Then~Else

If 条件式 Then
 条件式が成立した場合に実行する処理
Else
 条件式が成立しなかった場合に実行する処理
End If

※条件式は比較演算子を用いて表現する

1
3
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
1
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?