[vba] 선택한 셀에 선택한 이미지 삽입 > vb6.0/vba

본문 바로가기

vb6.0/vba

[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

등록된 댓글이 없습니다.
게시판 전체검색