roych你好,把这注释后已实现,
' For Each shp In ActiveSheet.Shapes
'On Error Resume Next '忽略错误继续执行VBA代码,避免出现错误消息
' ''''If Not Intersect(Range(shp.TopLeftCell, shp.BottomRightCell), ActiveCell) Is Nothing Then shp.Delete
'On Error GoTo 0 '恢复正常的错误提示
' Nex
其中的这句有错误:
If Not Intersect(Range(shp.TopLeftCell, shp.BottomRightCell), ActiveCell) Is Nothing Then shp.Delete