在excel VBA 中,如何设置A1:A50单元格批注的大小和位置?(批注背景为图片)

2025-03-04 07:21:40
推荐回答(3个)
回答1:

With Sheets(1).Range("A1:A50")
.Comment.Text ""
.Comment.Visible = True
.Comment.Shape.Fill.UserPicture _ '这是设置图片
"C:\Users\Administrator\Desktop\Snap1.jpg"
.Comment.Shape.IncrementLeft 96# '这是离左边距离
.Comment.Shape.IncrementTop 15# '这是离顶部距离
.Comment.Shape.ScaleWidth 2.16, msoFalse, msoScaleFromTopLeft '设置宽度
.Comment.Shape.ScaleHeight 2.25, msoFalse, msoScaleFromTopLeft '设置高度
End With

回答2:

录制宏吧,看看宏代码你就明白了。。

回答3:

右键——设置格式