View Single Post
  #1   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

Hi

I found the code below (which I've adapted slightly)on OZGrid. I was under the impression this would embed the picture. However having tested it by emailing to someone else it is actually linking the picture (emailed s/sheet has a box saying the linked image cannot be displayed).

What I'd like it to do is take the user to a browse to a graphic, embed the graphic in the spreadsheet and resize the graphic. As it stands the macro works perfectly apart from not embedding it.

Any help greatly appreciated! Thanks in advance.

Steve

Sub InsertImageLumindoor1()

Dim myFiles, e

myFiles = Application.GetOpenFilename(, , , , True)
If Not IsArray(myFiles) Then Exit Sub
For Each e In myFiles
With ActiveSheet
With .Pictures.Insert(e)
.Left = Range("A20").Left
.Top = Range("B20").Top
.ShapeRange.LockAspectRatio = msoFalse
.Height = 160
.Width = 287
End With
End With

Next

End Sub