Comment box disappears or moves

AndiH

New Member
Joined
Dec 3, 2009
Messages
41
I've inserted comments in many cells to use as an audit trail on my spreadsheet. Now when I open the spreadsheet, many of the comment boxes have closed up and moved far away from the original cell. All I can see is the call-out box line.

Is there a way to reformat all of them to restore and maintain the size of the comment box or do I have to do this one cell at a time? Argghh. Also, is there anything I can do to avoid this in the future?

I've seen threads which suggest changing "Tool Tips" in Windows but I can't find them in Windows 2003 and am uncertain this would be the solution anyway.
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Hi,

Save a back-up copy of your workbook (just in case).

Right click on the sheet tab and choose view code.

Paste in this code:
Code:
Sub FixComments()
    Const lngBUFFER As Long = 10
    
    Dim cmt As Comment
    
    For Each cmt In Comments
        cmt.Shape.Left = cmt.Parent.Left + cmt.Parent.Width + lngBUFFER
        cmt.Shape.Top = cmt.Parent.Top - lngBUFFER
        cmt.Shape.Placement = xlFreeFloating
    Next cmt
    
End Sub

Then left click anywhere inside the procedure so the cursor is flashing inside the procedure and press F5 to run it.
 
Upvote 0
Thank you Colin. I'm half-way there. It looks as if the comments have re-aligned to the appropriate cells but the comment text box itself is still closed.
A
 
Upvote 0
We can change the size of the comments within the procedure - I'm "working blind" here so my offering is:

Rich (BB code):
Sub FixComments()
    Const lngBUFFER As Long = 10
    
    Dim cmt As Comment
    
    For Each cmt In Comments
        cmt.Shape.TextFrame.AutoSize = True
        cmt.Shape.Left = cmt.Parent.Left + cmt.Parent.Width + lngBUFFER
        cmt.Shape.Top = cmt.Parent.Top - lngBUFFER
        cmt.Shape.Placement = xlFreeFloating
    Next cmt
    
End Sub
 
Upvote 0
Colin, thank you this seems to have corrected the comment issues in my worksheet. THANK YOU!!!:)


We can change the size of the comments within the procedure - I'm "working blind" here so my offering is:

Rich (BB code):
Sub FixComments()
    Const lngBUFFER As Long = 10
    
    Dim cmt As Comment
    
    For Each cmt In Comments
        cmt.Shape.TextFrame.AutoSize = True
        cmt.Shape.Left = cmt.Parent.Left + cmt.Parent.Width + lngBUFFER
        cmt.Shape.Top = cmt.Parent.Top - lngBUFFER
        cmt.Shape.Placement = xlFreeFloating
    Next cmt
    
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,427
Members
448,961
Latest member
nzskater

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top