# reset comment position for range...I have the following code & unable to troubleshoot...any insights as what's wrong?  Thx!



## sadams1 (Apr 20, 2020)

Sub Macro1()
Dim r As Range
'
' Macro1 Macro
'
' Keyboard Shortcut: Ctrl+Shift+Y
'

For Each r In Selection
    If Not r.Comment Is Nothing Then
        With r.Comment.Shape

rComment.Shape.Top = rComment.Parent.Top + 5
rComment.Shape.Left = rComment.Parent.Offset(0, 1).Left + 5


        End With
    End If
Next r
End Sub


----------



## Fluff (Apr 20, 2020)

You should have a full stop between r & comment.


----------



## sadams1 (Apr 20, 2020)

arrrgggghhh...such a fine line between stupid & clever!  Thank you very much...can't believe I missed that.


----------



## Fluff (Apr 20, 2020)

You're welcome & thanks for the feedback.


----------



## sadams1 (Today at 10:23 AM)

hello Fluff, sorry to bother & I know it's been awhile since this thread was resolved but if you're still here, just a quick question about the code discussed in this thread...would it be possible to make a comment or comments in a range visible?  I've been messing with the code & getting nowhere.  Thanks!


----------



## Fluff (Today at 10:34 AM)

How about

```
Sub Macro1()
Dim r As Range
'
' Macro1 Macro
'
' Keyboard Shortcut: Ctrl+Shift+Y
'

For Each r In Selection
If Not r.Comment Is Nothing Then
With r.Comment

.Shape.Top = .Parent.Top + 5
.Shape.Left = .Parent.Offset(0, 1).Left + 5
.Visible = True

End With
End If
Next r
End Sub
```


----------



## sadams1 (Today at 10:49 AM)

wow...you'd laugh if you saw the number & combinations of putting ".Visible = True" in that code & nothing worked.  I'm literally shaking my head.  Thank you very much for a quick simple fix!


----------



## Fluff (Today at 10:51 AM)

Glad to help & thanks for the feedback.


----------

