回答編集履歴

1

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

2019/03/12 12:35

投稿

komugi3333
komugi3333

スコア94

test CHANGED
@@ -14,13 +14,19 @@
14
14
 
15
15
 
16
16
 
17
- CommandButton1.Picture = Application.CommandBars.GetImageMso("Cut", 16, 16)
17
+ Dim objB As CommandBars
18
18
 
19
- CommandButton2.Picture = Application.CommandBars.GetImageMso("ChartInsert", 16, 16)
19
+ Set objB = Application.CommandBars
20
20
 
21
- Image1.Picture = Application.CommandBars.GetImageMso("Copy", 16, 16)
21
+
22
22
 
23
+ CommandButton1.Picture = objB.GetImageMso("Cut", 16, 16)
24
+
25
+ CommandButton2.Picture = objB.GetImageMso("ChartInsert", 16, 16)
26
+
27
+ Image1.Picture = objB.GetImageMso("Copy", 16, 16)
28
+
23
- Label1.Picture = Application.CommandBars.GetImageMso("FilePrint", 16, 16)
29
+ Label1.Picture = objB.GetImageMso("FilePrint", 16, 16)
24
30
 
25
31
 
26
32