各オブジェクトのプロパティは以下のように設定します。
| Object |
Property |
Setting |
| ListBox |
Name |
lstItems |
| TextBox |
Name |
txtItem |
| ComandButton1 |
Name |
cmdAdd |
| Caption |
Add Item |
| CommandButton2 |
Name |
cmdRemove |
| Caption |
Remove Item |
| CommandButton3 |
Name |
cmdClear |
| Caption |
Clear Items |
| CommandButton4 |
Name |
cmdSort |
| Caption |
Sort Items |
フォームのOn Open, On Closeイベント、それから各コマンドボタンののOn
Clickイベントに以下のVBAコードを追加します。