Excel 将图片的链接 URL 显示为图片

1. 如下VBA脚本将c1单元格内图片url链接在单元C1内把图片显示出来

Sub Test()
   Dim Pic As Picture
    Application.ScreenUpdating = False
    With ActiveSheet.Range("C1")
        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
    Application.ScreenUpdating = True
End Sub
查看全文