Dear Sirs,
From time to time, my worksheets cell comments will mysteriously got strayed with comment box positions gone far far away, especially when filtering is in place in the sheet.
I have searched the Internet for the following codes which runs fine for re-positioning cell comments for whole sheet :
But when I cannot modify the codes for selected range of cells :
Would appreciate if anyone could help.
Many thanks.
From time to time, my worksheets cell comments will mysteriously got strayed with comment box positions gone far far away, especially when filtering is in place in the sheet.
I have searched the Internet for the following codes which runs fine for re-positioning cell comments for whole sheet :
Code:
Sub ResetSheetCommentBoxPosition()
'Reset Comment box to Original Position FOR WHOLE SHEET
Dim cmt As Comment
For Each cmt In ActiveSheet.Comments
cmt.Shape.Top = cmt.Parent.Top + 5
cmt.Shape.Left = _
cmt.Parent.Offset(0, 1).Left + 5
Next
End Sub
But when I cannot modify the codes for selected range of cells :
Code:
Dim cmtx As Comment
Dim WorkRng1 As Range
For Each cmtx In WorkRng1.Comment
cmtx.Shape.Top = cmtx.Parent.Top + 5
cmtx.Shape.Left = cmtx.Parent.Offset(0, 1).Left + 5
Next
End Sub
Would appreciate if anyone could help.
Many thanks.