VB coding assistance for Header/Footer

G

Guest

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").Value)

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

End Sub

Thanks,
Hank
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top