Still Need Help Repositioning Comments
I'm trying to position Comments above the cell they relate to. When running
this code, (trying different numbers for Top, Left), the comment only appears
repositioned when I right click the cell and click "Edit Comment", i.e. in
edit mode. Thus, the code isn't working. I need to resolve this today, if
possible. Help, please.
Sub RePosComments()
Dim myCell As Range
Dim myRng As Range
Sheets("Detail").Activate
Range("dAllHeaders").Select
Set myRng = Selection
For Each myCell In myRng.Cells
If Not (myCell.Comment Is Nothing) Then
With myCell.Comment
.Shape.Top = .Parent.Offset(0, 1).Top + 5
.Shape.Left = .Parent.Offset(0, 1).Left - 5
End With
End If
Next
End Sub
|