+ Reply to Thread
Results 1 to 4 of 4

Insert specific picture into comment Macro help!

  1. #1
    Registered User
    Join Date
    02-23-2011
    Location
    Auckland, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    4

    Insert specific picture into comment Macro help!

    Hi there,

    I have a large spreadsheet filled with products. I am trying to create a macro that will insert a comment with the picture of that product (so that it appears to 'pop up').

    I can do this 1 by 1, however there are a few hundred on this sheet and this is a regular task for me.

    Obviously, each product is different and needs a different picture. I have collated all pictures in one folder under C:\My Pictures\ and named them (Product code).jpg . The product codes are in column A of this sheet, and I would like the comments to appear in column B.

    Please note that it also needs to lock the aspect ratio of the original picture and resize to be the same size as the original picture.

    This is my first macro (recording doesn't seem to work) and here's what I have so far:

    Please Login or Register  to view this content.
    This works, however all it does it put one picture in cell A1.

    Please help! Thank you in advance!

    P.S. I am using Excel 2010.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,359

    Re: Insert specific picture into comment Macro help!

    Try something like this:
    Please Login or Register  to view this content.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    02-23-2011
    Location
    Auckland, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Insert specific picture into comment Macro help!

    Thanks you! Works great, but just one problem - the comments are sized according to the size of the first photo, is there any way to make each one sized individually according to its respective size?

    Thank you again in advance!!

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,359

    Re: Insert specific picture into comment Macro help!

    Hi,
    I have no idea but look at this answer about
    aspectration = msoFalse
    at http://excel.bigresource.com/Picture...-s8Gmxsck.html
    Toss this in my code above and see what happens. Otherwise you are looking for all the methods and/or attributes of shapes.

+ 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