Attached file Image Hold.xlsm has macro that allows you to select an image and uploads it to the spreadsheet.
I need to "embed" the image into merged "bloc" G5 - H9 AND ensure the image will still be visible if the file is sent to another machine.
Option Explicit
Sub Button1_Click()
Dim vntFilename As Variant, lngLeft As Long, lngTop As Long, shpPic As Shape
vntFilename = Application.GetOpenFilename("Pictures *.*,*.*")
If vntFilename = False Then Exit Sub
lngLeft = Columns("G:G").Left
lngTop = Rows(5).Top
'Parameters for Width and Height maintain the aspect ratio
Set shpPic = ActiveSheet.Shapes.AddPicture(vntFilename, False, True, lngLeft, lngTop, -1, -1)
'If re-setting, use Height to retain aspect ratio
With shpPic
.Height = 100
End With
End Sub
All responses accepted gratefully
Ochimus
Bookmarks