I found the difficulties to find the right approach in Excel HOW I can to format inserted object (picture) with line borders and colors etc.
Code
Option Explicit
Sub ImportPictureNoLinked()
Dim fd As Office.FileDialog, pic As Object
Set fd = Application.FileDialog(msoFileDialogFilePicker)
With fd
.AllowMultiSelect = False
.Title = "Please select the file"
.Filters.Add "Images", "*.gif; *.jpg; *.jpeg; *.bmp; *.tif; *.png"
.FilterIndex = 2
If .Show = -1 Then
Set pic = ActiveSheet.Shapes.AddPicture(Filename:=.SelectedItems(1), LinkToFile:=False, _
SaveWithDocument:=True, Left:=ActiveCell.Left, Top:=ActiveCell.Top, _
Width:=ActiveCell.Width, Height:=ActiveCell.Height)
'<HERE I WANT A CODE THAT MAKE INSERTED PICTURE BORDER LINE WITH COLOR AND DISABLE LOCK ASPECT RATIO>
Set pic = Nothing
End If
End With
End Sub
Display More