Adding an image to an Image control

O

ordnance1

I would like to create a worksheet where I can store information on number
of items. Each row of the worksheet would store data on 1 item only, and the
last cell of data would contain a link to an image of the item
(C:\Users\Dad\Desktop\test.png).

What I can not figure out is how to create the code to display the image in
an Image control on my Userform.

What I tried was:

Image1.Picture = Range("E3").Value

where Range("E3") contained C:\Users\Dad\Desktop\test.png.

Is this do able? If so could someone point me in the right direction.
 
P

Peter T

Image1.Picture = LoadPicture(Range("E3").Value)

Depending on the way you have things arranged you might need to do something
like

Worksheets("Sheet1").OLEObjects("Image1").Object.Picture =
LoadPicture(Range("E3").Value

Regards,
Peter T
 

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

Top