Insert picture from filename & path in sheet's cell

  • Thread starter Thread starter Corey
  • Start date Start date
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....
 
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.
 
Back
Top