所以我对一个包含设置图片的单元格进行了评论 ActiveCell.Comment.Shape.UserPiсture“C:\ path \ img.png”
但我希望将它复制到另一个单元格。我该怎么做?
答案 0 :(得分:2)
您需要使用Shape Pickup
和Apply
方法,但您将获得评论形状的所有设置格式,而不仅仅是图片。< / p>
Sub test()
Dim comment1 As Shape
Dim comment2 As Shape
Set comment1 = Sheet1.Shapes("Comment 1")
Set comment2 = Sheet1.Shapes("Comment 2")
'Copy all of the formats from the comment's shape
comment1.PickUp
'Paste all of the copied formats to the target
comment2.Apply
End Sub