Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
With Img.ShapeRange
.Top = YourCell.Top
.Left = YourCell.Left
.Height = YourCell.Height
.Width = YourCell.Width
End With
[blue] Range("E2").Select
ActiveSheet.Pictures.Insert("<pathtomyimage>").Select
Selection.Placement = xlMove[/blue]
Sub AddCommentWithImage()
With Range("A1").AddComment
.Visible = False
.Text Text:=""
With .Shape
.Fill.UserPicture "D:\x\test.jpg"
.ScaleWidth 2.5, msoFalse
.ScaleHeight 3.66, msoFalse
End With
End With
End Sub
'
Dim oIMG As Object
With ActiveSheet
.Pictures.Insert("<pathtomyimage>").Select
Set oIMG = .Shapes(.Shapes.Count)
With .Cells(2, "E") 'your cell referenced here
oIMG.Placement = xlMoveAndSize
oIMG.LockAspectRatio = msoFalse
oIMG.Height = .RowHeight
oIMG.Width = .Width
oIMG.Top = .Top
oIMG.Left = .Left
End With
End With