AutoFit Row Height
On Feb 19, 1:55 pm, "PWS" wrote:
I have a row of merged cells, into which the user types comments.
These comments could be a few as 2 lines and up to as many as 12
lines. What I would like is a procedure I could run which will resize
the height of the merged cell to just fir the amount of text entered.
Range ("TargetRange").Rows.AutoFit works fine if the cells are not
merged into one.
However if the cells are merged andf the same line of code is run the
cell collapes to just one line.
is there a way to achieve what I require?
Hi
Do the cells need to be merged? Row and Column Autofit don't work with
merged cells (presumably because the system doesn't know what to do
with the other cells in that row/column)
You can Autofit unmerged cells though.
with merged cells you would have to set the row height/column width.
You can't get at the text length in units like cm (as far as I know)
so you would have to count characters and so on....messy.
regards
Paul
|