Insert picture from filename & path in sheet's cell

C

Corey

If i have a pictures filename & path (EG. Z:My Documents\Pictures\Picture 1.jpg) on a sheet in a
cell,
is it possible to using vb to have the picture(If Filename & Path are still valid that is) placed on
the sheet ?
I have code that can propmt a user for a selection of an image, but i do not know HOW/IF it can be
modified to call the Picture selection by the cells value.

Does anyone know if this is a possibility?

Corey....
 
G

Guest

Lets say that in cell B9 we have:
C:\Documents and Settings\Owner\My Documents\My Pictures\100_0061.JPG

then:

Sub cory()
Dim s As String
s = Range("B9").Value
Range("Z100").Select
ActiveSheet.Pictures.Insert(s).Select
End Sub

will get the picture and insert it near Z100.
 

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