in reply to Re: Problem seeing multiline text in Excel cells
in thread Problem seeing multiline text in Excel cells

Thanks, it could well be but I do not think that is what it says 'on the tin (for WrapText).
I added the following line and I can see all the text.
$sheet -> Range("B2:J2") -> {RowHeight} = 60;
However, the text is positioned at the bottom of the cell. So far my searches to find how to set the alignment
so that it is at the top of the cell have failed. Can anyone help?
Also is there any means of setting the height so that this is the correct value for the entered text so that there are no blank lines?

Replies are listed 'Best First'.
Re^3: Problem seeing multiline text in Excel cells
by merrymonk (Hermit) on Jan 24, 2010 at 17:01 UTC
    Using the reccomended method of recording a VBA macro, I found that the following two lines
    put the text to the top and left of the cell.
    $sheet -> Range("B2:J2") -> {HorizontalAlignment} = xlHAlignLeft; $sheet -> Range("B2:J2") -> {VerticalAlignment} = xlTop
    It still would be good to know how to make the height of the row to fit exaclty the height of however many lines of text there are.