title: How to correctly calculate the height of a table
body: <p>How do you calculate the height of a flexgrid table in VB6 so that it only contains the number of filled rows.</p>
  
  <p>Currently </p>
  
  <pre><code>myFlexGrid.Height = (myFlexGrid.CellHeight * myFlexGrid.Rows) ' paraphrased from code
  </code></pre>
  
  <p>comes out at about 3 pixels short per line. Adding in the magic number is a bit hackish and would like to accomplish this without having to resort to that.</p>
  
  <p><strong>Update:</strong>
  To complicate matters it also needs to handle multiline cells.</p>