[vba] [vba] 선택한 셀에 선택한 이미지 삽입
하나를하더라도최선을
2020-02-15 22:55
5,051
0
본문
Sub insert_Pic()
Dim Pic As Variant
Pic = Application.GetOpenFilename(filefilter:="Picture Files,*.jpg;*.bmp;*.tif;*.gif;*.png")
If Pic = False Then Exit Sub
With ActiveSheet.Pictures.Insert(Pic).ShapeRange
.LockAspectRatio = msoFalse
.Height = Selection.Height - 4
.Width = Selection.Width - 4
.Left = Selection.Left + 2
.Top = Selection.Top + 2
End With
End Sub
댓글목록0