Posts by jml2

    I'm trying to generate a header on my reports ("MASTER") tab. Right now it will pull the year selected from another tab and put the data into a String. I can get the String into the Header no problem. But I want to set the font, font size and both it and when I try to do that it doesn't work.


    This is the code that works but is the wrong font.

    Code
    Dim StringOne As String
    Dim StringTwo As String
    Sheets("Overall Statistics").Select
    StringOne = Range("$M$2").Value
    StringTwo = StringOne & " END OF THE YEAR INJURY ASSESSMENT"
    Sheets("MASTER").Select
    Application.ActiveSheet.PageSetup.CenterHeader = StringTwo
    Sheets("ROSTER").Select
    Range("E7:F7").Select

    This is the code that doesn't


    Code
    Worksheets("MASTER").PageSetup.CenterHeader = _
    "&24&B&Calibri" & StringTwo

    This what the record macro does when I do it manual:



    This doesn't allow me to set the year based on the $M$2 cell in the Overall Statistics sheet


    Any ideas?