Sub Test()
On Error Resume Next
    Dim Rng As Range
    Dim Cell As Range
    Dim Pic As Picture
    Application.ScreenUpdating = False
    Set Rng = Range("C1:C" & Range("c" & Rows.Count).End(xlUp).Row)
    For Each Cell In Rng
        With Cell
            Set Pic = .Parent.Pictures.Insert(.Value)
            With .Offset(, -1)
                Pic.Top = .Top
                Pic.Left = .Left
                Pic.Height = .Height
                Pic.Width = .Width
            End With
        End With
    Next Cell
    Application.ScreenUpdating = True
End Sub 
View Code

操作步骤:
1. 新增一列辅助列放图片地址
2. 图片会被插入在辅助列的前一列中,因为前一列的大小影响到图片的显示大小
3. 执行完处理完毕后,删除辅助列即可

posted on 2014-03-05 13:15  Linky  阅读(676)  评论(0)    收藏  举报