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:
Sub Insert_Comment_Picture()
Range("A1").AddComment ("")
Range("A1").Comment.Shape.Fill.UserPicture "C:\My Pictures\1.jpg"
End Sub
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.
Bookmarks