Sub 按钮4_Click()
Dim iRow As Single, shp As Shape, Target As Range
With ActiveSheet
For iRow = 5 To .Cells(65536, 1).End(xlUp).Row
'取得A列最后一个非空单元格行号
.***.insert(***.path & "\pic\" & .Cells(iRow, 2) & ".jpg").Select
Set Target = .Cells(iRow, 4)
With Selection
.Top = ***.top + 1
.Left = ***.left + 1
.Width = ***.width - 1
.Height = ***.height - 1
End With
Next
End With
End Sub
代码是书上照抄的,但运行起来,说不能取得类picture 的insert属性。
是什么原因呢?帮我看看哪里出错。