How can I add in variables for headers in VBA

storemannequin

Board Regular
Joined
May 29, 2010
Messages
108
I highlight in red where I'd like to insert some variable names for the column headers but things are not working out:

Rich (BB code):
 With WSN.PageSetup
        .PrintTitleRows = "$1:$1"
        .PrintTitleColumns = ""
        .LeftHeader = "&""Calibri,Bold""&12HENRY SCHEIN INC"
        .CenterHeader = _
        "&""Calibri,Bold""&14SPECIAL MARKETS" & Chr(10) & LastSup & Chr(10) & "Voju7P-45868b & Year(Now) & The One Report" & Chr(10) & MonthName(Month(Date) - 1)
        .RightHeader = "&""Calibri,Bold""&12&D"
        .LeftFooter = "&6&F" & Chr(10) & "DMS"
        .CenterFooter = "&8&P of &N" & Chr(10) & "Proprietary Information"
        .CenterFooter = "Page &P of &N" & Chr(10) & "Proprietary Information"
        .CenterHorizontally = True
        .Orientation = xlLandscape
        .Zoom = False
        .FitToPagesWide = 1
        .FitToPagesTall = 1000
        .PrintGridlines = True
        
    End With
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Forum statistics

Threads
1,224,507
Messages
6,179,176
Members
452,893
Latest member
denay

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top