Reposition all comments in selection

Sub RepositionCommentsSelection()
 Dim c As Range
 Dim myRange As Range

  If TypeName(Selection) <> "Range" Then Exit Sub

 Set myRange = Selection

 For Each c In myRange.Cells

  With c.Comment
   .Shape.Top = .Parent.Top + 5
   .Shape.Left = .Parent.Offset(0, 1).Left + 5
  End With

 Next c

 myRange.Select

End Sub


© Copyright andrewsexceltips.net All Rights Reserved.