I'm trying to fix the "Cannot Shift Objects off sheet" by looping through all the cells in a workbook. If the cell has a comment I want to change the properties of the comment to "Move and Size" (xlMoveAndSize) with the cell instead of the "Dont move or Size with cells" (xlFreeFloating).
I found some code to help loop through comments, but my code for the properties doesn't seem to be working
I found some code to help loop through comments, but my code for the properties doesn't seem to be working
Code:
Sub AdjustComments()
Dim endcol, endrow, x, i, y, r As Range
Application.DisplayCommentIndicator = xlCommentAndIndicator
For Each r In ActiveSheet.UsedRange
On Error Resume Next
x = r.Comment.Text
If Err = 0 Then
r.commment.Shape.Select True
With Selection
[b].Placement = xlMoveAndSize[/b]
End With
End If
Next r
Application.DisplayCommentIndicator = xlCommentIndicatorOnly
End Sub