엑셀
엑셀 사진(이미지) 선택 셀에 자동으로 넣기
광심사
2023. 4. 14. 15:58
엑셀에서 alt+f11을 눌러서 창을 띄워 준다.
삽입 - 모듈
Sub Pic()
Dim myPic As Variant
myPic = Application.GetOpenFilename _
(filefilter:="Picture Files,*.jpg;*.bmp;*.tif;*.gif")
If myPic = False Then
Exit Sub
End If
With ActiveSheet.Pictures.Insert(myPic).ShapeRange
.LockAspectRatio = msoFalse
.Height = Selection.Height - 4
.Width = Selection.Width - 4
.Left = Selection.Left + 2
.Top = Selection.Top + 2
End With
End Sub