I want to load data including an image from a Userform onto an excel worksheet.  I want to specify the image width and to maintain the aspect ratio.
The line .LockASpectRatio = MsoTrue shows as an error.  Can anyone help with the syntax?
'Save image to Cell

    Dim FileNAme As Variant
    Dim Img As Picture

If FileNAme <> "" Then
    
     FileNAme = Me.TextBox_5
    
With ws
     Set Img = .Pictures.Insert(FileNAme)

With Img
    .Placement = xlMove
    .Width = 150
    .LockAspectRatio = msoTrue
    .Left = ws.Cells(lr, "D").Left
    .Top = ws.Cells(lr, "D").Top
           
End With

End With

End If


Why is my .LockAspectRatio=msoTrue showing as an error
I'm sure it should be
.ShapeRange.LockAspectRatio = msoTrue
Another observation,
If FileNAme <> "" Then    
 FileNAme = Me.TextBox_5

You are checking if Textbox is not empty before you set the text box variable. Therefore FileNAme  would always empty.
