Say if I have an excel spreadsheet with an image overlaid. Obviously they are开发者_C百科 not embedded to any cell and are instead laid over the spreadsheet.
How would I find the cell locations that the image lies on? Is there anyway to do this?
You can examine the Shapes
collection in your worksheet. You may still need to figure out which one is interesting if there are many, though. In VBA you might start with something like:
Sub Macro1()
Dim o As Shape
For Each o In Sheet1.Shapes
Debug.Print o.Name, o.TopLeftCell.Address, o.BottomRightCell.Address
Next
End Sub
精彩评论