title: Resize excel comments to fit text with specific width
body: <p>I'd like to have the comment box fit the comments just right (no extra space at the bottom).</p>
  
  <p>I know there is the <code>.AutoSize</code> but I want the maximum width to be 300.</p>
  
  <p>Here is the code I have,</p>
  
  <pre><code>For Each mycell In myRng.Cells
      If Not (mycell.Comment Is Nothing) Then
        With mycell.Comment.Shape
          .TextFrame.AutoSize = True
          If .width &gt; 300 Then
            lArea = .width * .height
            .width = 300
            .height = (lArea / 300)
          End If
        End With
      End If
  Next mycell
  </code></pre>
  
  <p><code>mycell</code> and <code>myRng</code> are Range datatypes, <code>lArea</code> is Long.</p>
  
  <p>Now, this works relatively well but leaves extra space at the bottom of a number of comments because the area the AutoSized text takes up is different from the area of the AutoSized comment box.</p>
  
  <p>Is there a way to check for blank space inside a comment and then trim it? Or is what I have the best it is going to be?</p>