Solved

Excel VBA Find the cell nearest to the top corner of an image

Posted on 2014-03-09
4
821 Views
Last Modified: 2014-03-09
Hi

Is it possible using Excel VBA to find the cell nearest to the top left corner of an image
inserted on the sheet
0
Comment
Question by:murbro
  • 2
  • 2
4 Comments
 
LVL 50

Expert Comment

by:Rgonzo1971
ID: 39916798
Hi,

Do you mean ?

MsgBox Selection.TopLeftCell.Address

Open in new window


Regards
0
 

Author Comment

by:murbro
ID: 39916805
Hi

No. I have several images that the user can drag around a sheet to design a report layout.
I need to use VBA to find the top left cell for each image
0
 
LVL 50

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 39916808
More like this?

For Each shp In ActiveSheet.Shapes
MsgBox shp.TopLeftCell.Address
Next

Open in new window

0
 

Author Closing Comment

by:murbro
ID: 39916813
Yes exactly. Great answer! Thanks very much
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question