开发者

How to find co-ordinates or Cell of picture object?

In Excel I have attached a picture to a cell using the following

Sub InsertPic()
    Dim mPic As Picture
    With ActiveSheet.开发者_如何学JAVARange("D12")
         Set mPic = .Parent.Pictures.Insert("C:\abc.png")
         mPic.Top = .Top
         mPic.Left = .Left
         mPic.Placement = xlMoveAndSize
     End With
 End Sub

Excel doesn't allow inserting pictures into cells but places it on it or attaches to it.

At run-time I need to find which Cell the picture is associated to, is this possible?


Use the .TopLeftCell property.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜