[vba] 선택한 셀에 선택한 이미지 삽입

하나를하더라도최선을 2020-02-15 22:55:23 41,582 0 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개

첫 번째 댓글을 작성해보세요!