The comment opens far from the associated box

Solved
Hello,

here is my problem:
when I click "edit comment" on my Excel sheet, it opens very far from the cell it is associated with.
I would like to know if there is a way to have the comment stick to its cell when I open it. (It's quite annoying to have to move them manually every time)
thank you

Configuration: Windows 7 / Firefox 19.0

3 answers

  1. Contributor
    Hello,

    to run on the relevant sheets by activating them first:
    Sub posComment() Dim com As Comment For Each com In ActiveSheet.Comments com.Shape.Left = Range(com.Parent.Address).Offset(0, 1).Left + 10 com.Shape.Top = Range(com.Parent.Address).Offset(0, 1).Top + 5 Next com End Sub 

    You can adjust the +10 (to the right) and the +5 (down).
    eric

    --
    You should never reply to an unsolicited PM...
    Well, that’s done.
    2
    1. Thank you for your response, eriiic.
      I saw on another page of the forum that you have already helped someone with the same problem (I could have looked more, sorry...)
      However, I don't have a handle on macros at all. How do I go about making this manipulation?
      I would also like to ask you if it is possible to customize comments with this macro system? For example, if I click "insert a comment", I want a blank comment to open, and I would like that when it opens, my template form that I edited by copying and pasting is already there.

      Thank you
      0
    2. It's all good, I searched how to insert macros and I succeeded.
      Eriiic, thank you so much, you really helped us a lot with this!
      0
    3. Contributor
      For example, if I do "insert a comment", I get a blank comment that opens and I would like it to have the template form that I edited by copying and pasting when it opens.
      It’s doable.
      Copying because it changes often?
      If there are 4-5 different ones, we can put them in the code and when you double-click on a cell, it asks you which one to use.
      Otherwise, it could be from a dedicated cell that you edit to avoid forgetting to copy.
      And possibly, we can plan a macro that puts the same comment on all cells in a selection.
      You see...

      eric
      0
    4. Yes, it's always the same comment, that's why I copy and paste it in all the cells. The big problem is that Excel doesn't retrieve all the information in case of a computer crash, for example. And putting comments in all the cells creates too much information in a single file/workbook.
      So the macro would be the best option.

      Thank you again.
      0
    5. Contributor
      Hello,

      Right now I don’t understand anything.
      You want to add a comment to all the cells but that’s too much so you don’t want to (?)
      And if it’s always the same, it doesn’t really have much interest...
      Could you provide a more concrete example?

      eric
      0