插入图片不粘贴在活动单元格中

时间:2014-01-22 16:02:37

标签: excel-2007

Sub InsertLogo1()
    ActiveCell.Select
    ActiveSheet.Pictures.Insert("Path").Select
End Sub

1 个答案:

答案 0 :(得分:1)

Dim Pic As Object
Set Pic = ActiveSheet.Pictures.Insert(Directory & "\" & filename)
With Pic
    .Top = ActiveCell.Top
    .Left = ActiveCell.Left
    .LockAspectRatio = msoTrue
    .Width = 225#
End With