Mega Code Archive

 
Categories / VisualBasic Script / Excel
 

To print header, control the font and to pull second line of header (the date) from worksheet

Sub Printr()     ActiveSheet.PageSetup.CenterHeader = "&""Arial,Bold Italic""&14My Report" & Chr(13) _         & Sheets(1).Range("A1")     ActiveWindow.SelectedSheets.PrintOut Copies:=1 End Sub