Copy User Form Image to Worksheet Automatically

How to copy User Form image to worksheet at a specific position automatically using VBA. This can help in creating ID cards for employees, students, etc,
Watch the video below:

Here’s the complete VBA code:
Private Sub CommandButton1_Click()
Dim shapeImage As OLEObject

With Worksheets(“Sheet1″)
Set shapeImage = .OLEObjects.Add(ClassType:=”Forms.Image.1”, _
Left:=.Cells(2, “B”).Left, _
Top:=.Cells(2, “B”).Top, _
Width:=Me.Image1.Width, _
Height:=Me.Image1.Height)
End With

With shapeImage
.Object.PictureSizeMode = 3
.Object.Picture = Me.Image1.Picture
End With

End Sub

Further reading:
PictureSizeMode property