Solved

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

Posted on 2014-03-09
4
843 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 51

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 51

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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

726 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