ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   pageheader size (https://www.excelbanter.com/excel-programming/328735-pageheader-size.html)

ermeko

pageheader size
 
Hi,
Is it possible to specify font size for PageHeader inside Macros?
ActiveSheet.PageSetup.CenterHeader = "good afternoon"

Tom Ogilvy

pageheader size
 
You can do it manually, so turn on the macro recorder and do it manually.
Then turn off the macro recorder and look at the recorded code.

--
Regards,
Tom Ogilvy


"ermeko" wrote in message
...
Hi,
Is it possible to specify font size for PageHeader inside Macros?
ActiveSheet.PageSetup.CenterHeader = "good afternoon"




ermeko

pageheader size
 
Hi Tom,
I tried but the size does not change. Maybe it is because the header text is
written in macros. I have to write it in macros because it writes to
different dates which change according to the data in worksheet. I just want
something like this:
ActiveSheet.PageSetup.CenterHeader.font.size = 16
Any sugestions?
Thanks
"Tom Ogilvy" wrote:

You can do it manually, so turn on the macro recorder and do it manually.
Then turn off the macro recorder and look at the recorded code.

--
Regards,
Tom Ogilvy


"ermeko" wrote in message
...
Hi,
Is it possible to specify font size for PageHeader inside Macros?
ActiveSheet.PageSetup.CenterHeader = "good afternoon"





Tom Ogilvy

pageheader size
 
There is no font property for a CenterHeader. You have to embed the size in
the string. For example

ActiveSheet.PageSetup _
.CenterHeader = "&""Arial,Bold""&14This is the Date: &D"

This sets the font, makes it bold, size 14

--
Regards,
Tom Ogilvy


"ermeko" wrote in message
...
Hi Tom,
I tried but the size does not change. Maybe it is because the header text

is
written in macros. I have to write it in macros because it writes to
different dates which change according to the data in worksheet. I just

want
something like this:
ActiveSheet.PageSetup.CenterHeader.font.size = 16
Any sugestions?
Thanks
"Tom Ogilvy" wrote:

You can do it manually, so turn on the macro recorder and do it

manually.
Then turn off the macro recorder and look at the recorded code.

--
Regards,
Tom Ogilvy


"ermeko" wrote in message
...
Hi,
Is it possible to specify font size for PageHeader inside Macros?
ActiveSheet.PageSetup.CenterHeader = "good afternoon"








All times are GMT +1. The time now is 06:58 PM.

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