ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel Header formatting with a programmed field (https://www.excelbanter.com/excel-programming/412949-excel-header-formatting-programmed-field.html)

Bob Reynolds[_4_]

Excel Header formatting with a programmed field
 
Hello, I have the following in my code:
..RightHeader = Format(Range("A2"), "mmmm yyyy")
This returns me the Date and Year in A2. My problem
How can I set this to be at Arial Bold 16pt?
It now defaults to the standard each time I run it.

Thanks
Bob Reynolds



Tim Williams

Excel Header formatting with a programmed field
 
With ActiveSheet.PageSetup
.CenterHeader = "&""Arial,Bold""&20" & Format(Range("A2"), "mmmm
yyyy")
End With

Tim

"Bob Reynolds" wrote in message
...
Hello, I have the following in my code:
.RightHeader = Format(Range("A2"), "mmmm yyyy")
This returns me the Date and Year in A2. My problem
How can I set this to be at Arial Bold 16pt?
It now defaults to the standard each time I run it.

Thanks
Bob Reynolds






All times are GMT +1. The time now is 10:13 AM.

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