回答編集履歴
1
追加
test
CHANGED
@@ -37,3 +37,49 @@
|
|
37
37
|
|
38
38
|
|
39
39
|
```
|
40
|
+
|
41
|
+
---
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
WidthとHeightに0.99をかけて99%にしています。
|
46
|
+
|
47
|
+
マイナスにしたり数値はお好みで。
|
48
|
+
|
49
|
+
```VBA
|
50
|
+
|
51
|
+
Sub 画像挿入()
|
52
|
+
|
53
|
+
Dim rng As Range
|
54
|
+
|
55
|
+
Set rng = ActiveCell
|
56
|
+
|
57
|
+
ActiveSheet.Paste
|
58
|
+
|
59
|
+
With Selection
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
.ShapeRange.LockAspectRatio = False
|
64
|
+
|
65
|
+
.Placement = xlMoveAndSize
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
.Width = rng.MergeArea.Width * 0.99
|
70
|
+
|
71
|
+
.Height = rng.MergeArea.Height * 0.99
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
.Left = rng.MergeArea.Left + (rng.MergeArea.Width - .Width) / 2
|
76
|
+
|
77
|
+
.Top = rng.MergeArea.Top + (rng.MergeArea.Height - .Height) / 2
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
End With
|
82
|
+
|
83
|
+
End Sub
|
84
|
+
|
85
|
+
```
|