View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default VB coding assistance for Header/Footer

I finally got it to work.

Private Sub Workbook_BeforePrint(Cancel As Boolean)

ActiveSheet.PageSetup.Leftheader = "&B&18&""Arial"" Stock: " & (Range("B2").Value)

ActiveSheet.PageSetup.Centerheader = "&B&18&""Arial"" Option: " & (Range("B3").Value)

End Sub


wrote in message ...
I'm using the following per the instructions below, and located at:
http://www.cpearson.com/excel/headfoot.htm

However the 2 rows highlighted in Red are not pulling the Data from cells B2
and B3.

Secondly I would like to make a Font Transition to 22PTS for for cells B2
and B3.


Private Sub Workbook_BeforePrint(Cancel As Boolean)

ActiveSheet.PageSetup.Leftheader = "&B&18&""Arial"" Stock: "
Format (Worksheets("CALL_Profitability").Range("B2").Valu e)

ActiveSheet.PageSetup.Centerheader = "&B&18&""Arial"" Option: "
Format (Worksheets("CALL_Profitability").Range("B3").Valu e)

End Sub

Thanks,
Hank