유틸/오피스
엑셀- 셀에 맞취 사진 넣기 매크로
성순군
2017. 11. 24. 16:23
Sub ins_Pic()
Dim myPic As Variant
myPic = Application.GetOpenFilename _
(filefilter:="Picture Files,*.jpg;*.bmp;*.tif;*.gif;*.jpeg")
If myPic = False Then
Exit Sub
End If
With ActiveSheet.Pictures.Insert(myPic).ShapeRange
.LockAspectRatio = msoFalse
.Height = Selection.Height
.Width = Selection.Width
.Left = Selection.Left
.Top = Selection.Top
End With
End Sub