View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
[email protected] stevepctamers@gmail.com is offline
external usenet poster
 
Posts: 10
Default Help Please - picture not embedding

On Friday, January 15, 2016 at 12:37:33 PM UTC, Robert Crandal wrote:
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


Absolutely spot on! Many thanks Robert.