Hi, I wrote this function to calcutae it based upon the linefeeds and that's not working (stated eaerlier by evryone)
- Public Function count_TextLines(myText As Variant) As Integer
- ' Counts the lines by comparing the contents by the themselves after removing
- ' the line brakes which is character 10.
- ' This gives back the number of breaks so we add 1 to get the number of lines,
- ' since the last line doesn't have a line break.
- count_TextLines = IIf(Len(Trim(myText)) = 0, 0, (Len(myText) - Len(Replace(myText, Chr(10), "")) + 2))
- End Function
Maybe integrating this with merged cells columnwidths added up and the fontsize ...
I'm goinf to try that, triggered by nruvba ; nice trick will update