LoginSignup
2
2

More than 5 years have passed since last update.

Excel VBAプログラミング環境構築

Posted at

VBE(Visual Basic Editor)開き方からソース保存まで

1.Excelのシートを右クリックし、コードの表示を選択する。

Screen Shot 2019-04-07 at 18.38.22.png

2.VBEの画面を表示し、VBA Projectプロジェクトを右クリックし、挿入選択する。

Screen Shot 2019-04-07 at 18.42.11.png

3.右側のソース欄にソースを記載し、上書き保存する。

Screen Shot 2019-04-07 at 18.43.34.png

4.ファイルの種類に「Excelマクロ有効ブック(*.xlsm)」を選択し、保存する。

Screen Shot 2019-04-07 at 18.44.17.png

VBE(Visual Basic Editor)ソース実行方法

1.カーソルフォーカスをサププロシージャの間に移動し、実行ボタンを押下する。

Screen Shot 2019-04-07 at 18.46.40.png

2.実行結果

Screen Shot 2019-04-07 at 18.51.40.png

VBE(Visual Basic Editor)デバッグ方法

1.ツール欄の空白位置に右クリックし、デバックを選択し、デバッグツール欄が表示する。

Screen Shot 2019-04-07 at 18.52.19.png

2.デバック箇所にストックポイントをクリックし、実行ボタンを押下する。

Screen Shot 2019-04-07 at 18.54.11.png

ボダンを追加方法

1.開発タブを表示する。

Parallels Picture1.png

2.Excelの開発タブから挿入を選択し、ボタンを選択する。

Screen Shot 2019-04-07 at 18.55.06.png

3.マクロの登録のパップアップ画面に「OK」を押下する。

Screen Shot 2019-04-07 at 18.57.04.png

4.ボタン1を右クリックし、マクロの登録を選択する。

Screen Shot 2019-04-07 at 18.57.57.png

5.マクロの登録のパップアップ画面に紐付きマクロを選択し、「OK」を押下する。

Screen Shot 2019-04-07 at 18.58.33.png

2
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
2
2