엑셀

엑셀- 셀에 맞취 사진 넣기 매크로

광심사 2014. 3. 6. 14:38

Alt + F11 > 삽입 > 모듈

 

붙여넣기

 

Sub ins_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
        .Width = Selection.Width
        .Left = Selection.Left
        .Top = Selection.Top
    End With

End Sub

 

엑셀에_사진넣기.txt

 

사용방법 : 셀지정 Alt + F8 실행

엑셀에_사진넣기.txt
0.0MB

'엑셀' 카테고리의 다른 글

엑셀 이름충돌 1분 해결방법  (0) 2017.06.28
문자열 계산하는 함수  (0) 2014.05.26
엑셀 파일 치료 마법사 V1.03  (0) 2014.01.20
[스크랩] 내역 행삽입 및 삭제  (0) 2012.08.18
면적자동계산서  (0) 2011.02.24