Sub DelPicByRng(rng As Range)
'删除指定单元格区域内的图片
Dim i As Integer
Set shps = rng.Worksheet.Shapes
For i = shps.Count To 1 Step -1 '倒序循环图片
If Not Intersect(shps(i).TopLeftCell, rng) Is Nothing Then '检测到图片位置与本区域重叠 则删除
shps(i).Delete
End If
Next i
End Sub
删除指定单元格区域内的图片
最新推荐文章于 2024-08-18 15:02:40 发布