How do I vertically center the text in an Excel label's caption?

phan picture phan · Jul 28, 2011 · Viewed 51.6k times · Source

In Excel 2007, I inserted an ActiveX label onto my worksheet. I right-clicked on it and viewed Properties and managed to change the TextAlign property to 2 (frmTextAlignCenter).

This aligns the label caption's text to the center of the label (horizontally), but the text remains at the TOP of the label. How do I center the caption's text VERTICALLY so that it is in the smack middle of the label?

I've searched "vertical alignment" in SO but nothing comes up for how to do this for an Excel label's caption.

Thanks!

Answer

jonsca picture jonsca · Jul 28, 2011

There's no way to do it directly. This post has a clever way to accomplish it, though. Make 2 boxes, with the inner one autosized around the text, and position that inner box at the midpoint of the outer box.