Hi everyone,
Hopefully an easy one for someone to help me with.
Can anyone supply the VBA to insert an image from file into a selected shape this is what the recorder gave me.
I would like the user to be able to choose an image from file and not restrict them to a pre-defined name.
Many thanks
Mark
(Excel 2013)
Hopefully an easy one for someone to help me with.
Can anyone supply the VBA to insert an image from file into a selected shape this is what the recorder gave me.
I would like the user to be able to choose an image from file and not restrict them to a pre-defined name.
Code:
Sub Stage1a()
'
' Stage1a Macro
'
'
ActiveSheet.Shapes.Range(Array("Rectangle 27")).Select
With Selection.ShapeRange.Fill
.Visible = msoTrue
.PresetTextured msoTexturePapyrus
.TextureTile = msoTrue
.TextureOffsetX = 0
.TextureOffsetY = 0
.TextureHorizontalScale = 1
.TextureVerticalScale = 1
.TextureAlignment = msoTextureTopLeft
End With
With Selection.ShapeRange.Fill
.Visible = msoTrue
.UserPicture "C:\Users\Pictures\IMG_20180510_102823.jpg"
.TextureTile = msoFalse
End With
End Sub
Many thanks
Mark
(Excel 2013)