Private Sub 指定したセル範囲にある図形を削除する()
指定セル範囲 = "B2:F20"
With ActiveSheet
Set セル範囲 = .Range(指定セル範囲)
For Each 図形 In .Shapes
If 図形.Type = msoPicture Then
Set 共有セル範囲 = Intersect(Range(図形.TopLeftCell, _
図形.BottomRightCell), セル範囲)
If Not (共有セル範囲 Is Nothing) Then
図形.Delete
End If
End If
Next
End With
End Sub