質問するログイン新規登録

回答編集履歴

1

コードが見にくかったので見やすくした

2019/03/12 12:35

投稿

komugi3333
komugi3333

スコア94

answer CHANGED
@@ -6,10 +6,13 @@
6
6
 
7
7
  Private Sub CommandButton1_Click()
8
8
 
9
+ Dim objB As CommandBars
10
+ Set objB = Application.CommandBars
11
+
9
- CommandButton1.Picture = Application.CommandBars.GetImageMso("Cut", 16, 16)
12
+ CommandButton1.Picture = objB.GetImageMso("Cut", 16, 16)
10
- CommandButton2.Picture = Application.CommandBars.GetImageMso("ChartInsert", 16, 16)
13
+ CommandButton2.Picture = objB.GetImageMso("ChartInsert", 16, 16)
11
- Image1.Picture = Application.CommandBars.GetImageMso("Copy", 16, 16)
14
+ Image1.Picture = objB.GetImageMso("Copy", 16, 16)
12
- Label1.Picture = Application.CommandBars.GetImageMso("FilePrint", 16, 16)
15
+ Label1.Picture = objB.GetImageMso("FilePrint", 16, 16)
13
16
 
14
17
  End Sub
15
18