ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Page Header from a cell in bold (https://www.excelbanter.com/excel-programming/285350-page-header-cell-bold.html)

Paul

Page Header from a cell in bold
 
Hi,

I want to print a page header with the value of cell G1.
Is it possible to have it in Bold and size 14?
Thanks
Paul



Tom Ogilvy

Page Header from a cell in bold
 
Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.LeftHeader = "&""Arial,Bold""&14 " & _
Activesheet.Range("G1").Value
End With
End Sub

If you don't know about events, see Chip Pearson's page on this

http://www.cpearson.com/excel/events.htm

--
Regards,
Tom Ogilvy


Paul wrote in message
...
Hi,

I want to print a page header with the value of cell G1.
Is it possible to have it in Bold and size 14?
Thanks
Paul





Paul

Page Header from a cell in bold
 
Thank you very much Tom. It works great
Regards & Good-weekend
Paul


"Tom Ogilvy" schreef in bericht
...
Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.LeftHeader = "&""Arial,Bold""&14 " & _
Activesheet.Range("G1").Value
End With
End Sub

If you don't know about events, see Chip Pearson's page on this

http://www.cpearson.com/excel/events.htm

--
Regards,
Tom Ogilvy


Paul wrote in message
...
Hi,

I want to print a page header with the value of cell G1.
Is it possible to have it in Bold and size 14?
Thanks
Paul








All times are GMT +1. The time now is 07:22 PM.

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