• Autosize Comments Globally in Excel

    Author
    Topic
    #469988

    Is there a way (perhaps via VBA) to autosize all comments in a spreadsheet?

    Viewing 1 reply thread
    Author
    Replies
    • #1231481

      Re: Autosize comments…
      There is no built-in way to do that as far as I know.

      Vba code could save the text and cell location for each comment, delete all comments and then add the comments back to the worksheet.
      Whether the comment size would be to your liking is uncertain.

      VBA code can size (not autosize) comments to a specific width and height. Something like…
      ‘–
      Set cmts = Worksheets(1).Comments
      For Each c In cmts
      c.Shape.Width = 70
      c.Shape.Height = 120
      Next
      ‘–
      Jim Cone
      Portland, Oregon USA
      Primitive Software Excel add-ins

    • #1231518

      Something like this:

      Code:
      for each cmt in activesheet.comments
          cmt.shape.textframe.autosize = true
       next cmt
      
    Viewing 1 reply thread
    Reply To: Autosize Comments Globally in Excel

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: