如何用VBA判断,工作表中是否有某个已经插入的图片

2024-12-27 22:17:57
推荐回答(1个)
回答1:

这个函数
Function CellImageCheck(CellToCheck As Range) As Integer
Dim wShape As Shape
For Each wShape In ActiveSheet.Shapes
If wShape.TopLeftCell = CellToCheck Then
CellImageCheck = 1
Else
CellImageCheck = 0
End If
Next wShape

End Function