+ Reply to Thread
Results 1 to 5 of 5

getting image cell location

  1. #1
    Registered User
    Join Date
    01-15-2009
    Location
    california
    MS-Off Ver
    Excel 2003
    Posts
    2

    getting image cell location

    Hello y'all!

    i need some minor help with Excel 03, i have a image in
    cell G12, i want to assign a macro to it that would give me the
    location of that image within the spreadsheet, so in this case, it
    should pop up with "G12" when i click on the image.

    I know how to assign a macro to a picture, but having trouble with the code.

    The code should be able to look at the location of the image, and
    determine the cell that the image is in.

    Please Login or Register  to view this content.
    Last edited by reyes; 01-15-2009 at 02:24 PM.

  2. #2
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    Something like this will work:

    Please Login or Register  to view this content.
    BTW, please wrap your code above in CODE tags as per the forum rules. Thanks.

    Jason

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello reyes,

    If you are looking for a picture, it is better to look for the picture than a generic Shape on the sheet.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  4. #4
    Registered User
    Join Date
    01-15-2009
    Location
    california
    MS-Off Ver
    Excel 2003
    Posts
    2
    Thanks Jason & Leith,

    Leith your code is more dynamic that can be included in multiple images and still functions when images are moved around in the sheet, so it works best.

    One last request i have is how to i add cells (rows or columns) in excel?

    example

    Please Login or Register  to view this content.
    In the code above how do i add 3 columns to whats in "Pic.TopLeftCell.Address" ?



    Please Login or Register  to view this content.
    Thanks again for your valuable input.

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello reyes,

    Here is how to place the date and time in the cell 3 columns to the right of the pictures upper left corner. Depending on the width of the picture, this cell could be covered.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1