View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Robert Crandal[_3_] Robert Crandal[_3_] is offline
external usenet poster
 
Posts: 161
Default Help Please - picture not embedding

See if this works for you:

Sub myImageEmbed()

Dim fn As Variant
fn = Application.GetOpenFilename(FileFilter:="JPEG Files (*.JPG), *.JPG",
Title:="Select File To Be Opened")

Set myDocument = Worksheets(1)

If fn = False Then
' Do nothing if no file selected
Else
' Set image position and size here
myDocument.Shapes.AddPicture fn, True, True, 100, 100, 70, 70
End If

End Sub