View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
Howard Kaikow Howard Kaikow is offline
external usenet poster
 
Posts: 269
Default RowHeight and AutoFit wit Merged Cells

"Peter T" <peter_t@discussions wrote in message
...
It appears to be limited to one cell.

It is doing the MergeArea in which the cell lives.

Maybe it's me that doesn't understand the purpose of your code. I assumed
the idea was to size a row height to the "autofit" height of a mergearea
consisting of two or more cells in a row (subject not making the row

height
less than it was).


Yes.

But your code doesn't do that at all. Instead it unmerges
the mergarea, does not resize the width of cell(1) to the original

mergearea
width, then autofits row height, does not re-merge the original mergearea.
If that's the intention I don't get it.


The code is doing the intended deed.
It unmerges so it can set the width of col 1 to the width of the original
col 1 + col 2;
Then it does an AutoFit with the unmereged cells.
then it sets the rowheight.
then it sets the width of column 1 back to the original width, then it
merges,
and, adjusts the row height.

The one I tested on is similar but a tad slower, PII 350.


This is a multibbot system, I'll boot to an OS with Excel 97, but first
gotta have some OJ, etc.!

In your reply to Greg you say you don't disable screenupdating as the
instance is not visible. Even not visible it's still worth disabling.



I tried Screenupdating, as expected, with a non-visible wbk, may actually
have slowed down things.