Hi,
I'm just learning how to use VBA and am stuck trying to change the default position of a comment box I'm creating. What code do I need to insert to move the location of the box from it's default lower right position? I'd like it to be centered and below its cell.
Here's the code I've pasted together from various posts on this site. It's works great except for the position.
Sub CommentPic()
Dim sFile As String
sFile = (ActiveCell.Value)
With ActiveCell.AddComment
.Text Text:=""
.Shape.Fill.UserPicture sFile
.Shape.ScaleWidth 6, msoFalse, msoScaleFromTopLeft
.Shape.ScaleHeight 7.5, msoFalse, msoScaleFromTopLeft
End With
End Sub
Thanks,
Dave
I'm just learning how to use VBA and am stuck trying to change the default position of a comment box I'm creating. What code do I need to insert to move the location of the box from it's default lower right position? I'd like it to be centered and below its cell.
Here's the code I've pasted together from various posts on this site. It's works great except for the position.
Sub CommentPic()
Dim sFile As String
sFile = (ActiveCell.Value)
With ActiveCell.AddComment
.Text Text:=""
.Shape.Fill.UserPicture sFile
.Shape.ScaleWidth 6, msoFalse, msoScaleFromTopLeft
.Shape.ScaleHeight 7.5, msoFalse, msoScaleFromTopLeft
End With
End Sub
Thanks,
Dave