Hi,
May I know how to lock aspect ratio by editing below code?
Thanks!
May I know how to lock aspect ratio by editing below code?
Code:
<style type="text/css">p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Helvetica Neue'}</style>Sub InsertPicFromFile()
Dim xRg As Range
Dim xCell As Range
Dim xVal As String
On Error Resume Next
Set xRg = Application.InputBox("Please select file path cells:", "Insert Imagesl", Selection.Address, , , , , 8)
If xRg Is Nothing Then Exit Sub
Application.ScreenUpdating = False
For Each xCell In xRg
xVal = xCell.Value
If xVal <> "" Then
ActiveSheet.Shapes.AddPicture xCell.Value, msoFalse, msoTrue, _
xCell.Offset(0, 1).Left, xCell.Top, xCell.Height, _
xCell.Height
End If
Next
Application.ScreenUpdating = True
End Sub
Thanks!