如何在excel中使用VBA提取图像?

时间:2014-10-21 01:22:35

标签: excel excel-vba excel-formula excel-2007 excel-2010 vba

我尝试在Excel中运行此宏时出错,是否有人能发现问题?

目标:

将来自K:K中的URL的图像插入J:J列中的单元格并调整大小。

错误:

  

运行时错误438对象不支持此属性或方法

代码:

Dim url_column As Range
Dim image_column As Range
Set url_column = Sheets("TAGGING").UsedRange.Columns("K:K")
Set image_column = Sheets("TAGGING").UsedRange.Columns("J:J")
Dim i As Long
For i = 1 To url_column.Cells.Count
    With image_column.Sheets("TAGGING").Pictures.Insert("K:K", "J:J")
        .Left = image_column.Cells(i).Left
        .Top = image_column.Cells(i).Top
        image_column.Cells(i).EntireRow.RowHeight = .Height
    End With
Next

0 个答案:

没有答案