Storing an image within a cell using VBA

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm building a product catalog for products we sell over the internet. I'm intermediate-level in building VBA apps within MS Office products

We have 1000's of products we need to track and would like to store the information about each product in an Excel 2003 spreadsheet with images of each product. I would like to create VBA to open a file directory listing (where the images are) and read in each image in that directory into cells down the Excel spreadsheet

What I'm unable to figure out is: What cell property I can use to store the image so the image becomes the contents of each consecutive cell. I am able to place an image container on top of a cell but in order to do this programatically (using VBA) I need to know how to make the image become the cell contents

Is this even possible? Has anyone done anything similar w/ sample code

Thanks in advance for your response. I appreciate any help we can get with this little project

Rick Beal
(e-mail address removed)
 
Pictures sit on the worksheet, they do not become part of a cell's contents.
Once you insert a picture into a sheet you can position it over a cell with
code like:

Sheet1.Shapes("Picture 1").Left = Range("D4").Left
Sheet1.Shapes("Picture 1").Top = Range("D4").Top

I think you're going to wind up with a very big workbook if you insert
thousands of pictures. You might consider insert hyperlinks to the pictures
instead.

--
Jim Rech
Excel MVP
| I'm building a product catalog for products we sell over the internet. I'm
intermediate-level in building VBA apps within MS Office products.
|
| We have 1000's of products we need to track and would like to store the
information about each product in an Excel 2003 spreadsheet with images of
each product. I would like to create VBA to open a file directory listing
(where the images are) and read in each image in that directory into cells
down the Excel spreadsheet.
|
| What I'm unable to figure out is: What cell property I can use to store
the image so the image becomes the contents of each consecutive cell. I am
able to place an image container on top of a cell but in order to do this
programatically (using VBA) I need to know how to make the image become the
cell contents.
|
| Is this even possible? Has anyone done anything similar w/ sample code?
|
| Thanks in advance for your response. I appreciate any help we can get with
this little project.
|
| Rick Beale
| (e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top