0
は、だから私は ActiveCell.Comment.Shape.UserPiсtureでsetted絵をconatainsセルにコメントしてい画像をあるコメントから別のコメントにコピーするにはどうすればいいですか? 「C:パスのimg.png」
をしかし、私はそれが別のセルにコピーすることにしたいです。それ、どうやったら出来るの?
は、だから私は ActiveCell.Comment.Shape.UserPiсtureでsetted絵をconatainsセルにコメントしてい画像をあるコメントから別のコメントにコピーするにはどうすればいいですか? 「C:パスのimg.png」
をしかし、私はそれが別のセルにコピーすることにしたいです。それ、どうやったら出来るの?
ShapeのPickup
とApply
のメソッドを使用する必要がありますが、設定されているすべてのフォーマットは、図形だけでなく、図形の形になります。
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
使用:ActiveCell.Copy anotherCell。 'anotherCell'は、「宛先」セルへの有効な範囲参照でなければなりません。 – user3598756
'ActiveCell.Copy anotherCell'は、単にコメント以上のものをコピーします。 'ActiveCell.Copy:anotherCell.PasteSpecial xlPasteComments'を使う必要がありますが、その場合でも、コメントテキストのフォーマット*と*を含むコメント全体をコピーしています。 – ThunderFrame