我发现这个代码将图像插入excel 2013,但图像比他们进入的单元格大.我认为将图像作为注释加载的最佳选择.
有人可以在下面修改此VBA以将其添加为评论吗?
Sub URLPictureInsert()
Dim cell, shp As Shape, target As Range
Set rng = ActiveSheet.Range("R2:R5") ' range with URLs
For Each cell In rng
filenam = cell
ActiveSheet.Pictures.Insert(filenam).Select
Set shp = Selection.ShapeRange.Item(1)
With shp
.LockAspectRatio = msoTrue
.Width = 50
.Height = 50
.Cut
End With
Cells(cell.Row, cell.Column + 5).PasteSpecial
Next
End Sub
Run Code Online (Sandbox Code Playgroud)