Row Height equivalent to xlColumnWidths?

  • Thread starter Thread starter Mark Worthington
  • Start date Start date
M

Mark Worthington

Is there a Row Height equivalent to xlColumnWidths? I have searched,
but have had no luck.

Given that I can't seem to do it manually, I can guess the answer, but
someone out there may know better ...

Many thanks,

Mark
 
Jim,

Using the macro recorder to copy/paste Column Widths gives the following
:

Selection.PasteSpecial Paste:=xlColumnWidths

Excel 2000 does not recognise xlColumnWidths (a bug) and a workaround is
to use Paste:=8 ... but xlColumnWidths it doesn't work in my Excel 2002
either, but that's another story.

Anyway, while the Paste Special dialog has the option to paste Column
Widths, there is no option for Row Heights. While the obvious answer is
"it can be done in this manner, write some code", I was wondering if
there actually is some method ....

Regards,

Mark
 
The constant is xlPasteColumnWidths in Excel 2002 and 2003. This doesn't
work in 2000 as you know so since "8" works in all versions (post Excel 97)
that may be the way to go.

There is no xlPasteRowHeights unfortunately. The workarounds are (1)
copy/paste entire rows. When an entire row is copied the row height comes
along. (2) A macro that adjusts each destination row to match its
corresponding source row height. Good enough?
 
Jim,

THanks for pointing out the 2002 xlPasteColumnWidths. No wonder I
couldn't get xlColumnWidths to work!

Yes, that is good enough.

Ta,

Mark
 
Back
Top