Excel - Macro to Insert Picture

Giganews Newsgroups
Subject: Excel - Macro to Insert Picture
Posted by:  marc74…@excite.com
Date: Tue, 15 Sep 2015

I Have the following Macro to insert Picture in excel form, it worked fine =
in older version Excel & in 2013 version it still works but instead of Inse=
rting the picture it seems that excel is just inserting the link, if the pi=
cture location is changed the form does not show the picture any more, I ne=
ed to be able to Insert the picture in the form & not just the link to the =
picture.

Any help is appreciated to fix this macro. +
Thanks.

***********************************************
Sub InsertPicture()

Dim myPicture As String, MyObj As Object

Range("A14").Select

myPicture =3D Application.GetOpenFilename _
    ("Pictures (*.gif; *.jpg; *.bmp; *.tif),*.gif; *.jpg; *.bmp; *.tif", _
        , "Select Picture to Import")

If myPicture =3D "False" Then Exit Sub

Application.ScreenUpdating =3D False

Set MyObj =3D ActiveSheet.Pictures.Insert(myPicture)
With MyObj
    With .ShapeRange
..LockAspectRatio =3D False
        .Height =3D 170
        .Width =3D 200
        .Left =3D .Left + 2
        .Top =3D .Top + 12
      =20
              End With
    .Placement =3D xlMoveAndSize
End With

Set MyObj =3D Nothing
Application.ScreenUpdating =3D True

End Sub
************************************************

Replies