ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Autofit custom header top margin to text size (https://www.excelbanter.com/excel-programming/423311-autofit-custom-header-top-margin-text-size.html)

Breck

Autofit custom header top margin to text size
 
I have written a macro to to enter 2 lines of text into a custom header.
This macro also allows the font size to be adjusted independently for each
line of text i.e. font size of 20 on the first line and font size 14 on the
second line. Is there a way to calculate the height of the 2 lines of text
and then use this calculation to adjust the top margin so that the custom
header is neither too small which would cut off some of the header or to
large which would waste space?



All times are GMT +1. The time now is 07:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com