Private Sub Worksheet_Change(ByVal Target As Range)
Dim srg As Range, x As Shape
If Target.Count = Target.EntireRow.Cells.Count Then
For Each x In Shapes
If x.Top >= Target(1).Top And x.Top < Target(1).Offset(1, 0).Top Then: x.Delete
Next x
End If
End Sub
这个有个BUG,当删除对象后,无法进行撤销操作。
Excel 删除行数据的同时删除当前行中的对象,布布扣,bubuko.com
原文地址:http://www.cnblogs.com/xyUbuntu/p/3866925.html