아래 매그로함수 사용
Sub URLPictureInsert()
'Updateby Extendoffice 20161116
'Update #1 by Haytham Amairah in 20180104
'Update #2 by Haytham Amairah in 20180108
Dim Pshp As Shape
Dim xRg As Range
Dim xCol As Long
On Error Resume Next
Application.ScreenUpdating = False
Set Rng = ActiveSheet.Range("A2:A140")
For Each cell In Rng
filenam = cell
ActiveSheet.Pictures.Insert(filenam).Select
Set Pshp = Selection.ShapeRange.Item(1)
Pshp.Placement = xlMoveAndSize
If Pshp Is Nothing Then GoTo lab
xCol = cell.Column + 1
Set xRg = Cells(cell.Row, xCol)
With Pshp
.LockAspectRatio = msoFalse
.Width = 60
.Height = 30
.Top = xRg.Top + (xRg.Height - .Height) / 2
.Left = xRg.Left + (xRg.Width - .Width) / 2
End With
lab:
Set Pshp = Nothing
Range("A2").Select
Next
Application.ScreenUpdating = True
End Sub
'IT' 카테고리의 다른 글
오늘부터 인증서 각축전…1월엔 민간인증서로 연말정산 (0) | 2020.12.10 |
---|---|
삼성전자 R&D 투자 부동의 1위…매출 대비 비중은 네이버가 최고 (0) | 2020.12.09 |
공인인증서 '안녕'…본인인증, 연말정산은 어떻게? (0) | 2020.12.07 |
[win10] 정해진 시간에 pc 끄기 & 켜기, 자동로그인 (0) | 2020.10.14 |
유용한 프로그램 (0) | 2020.08.06 |