I have a VBA script that I've culled from the internet. It takes the contents of a cell and puts it into the appropriate header. This works exactly how I need it.
Sub InsertHeaderFooter() ' inserts the same header/footer in all worksheets Dim ws As Worksheet Application.ScreenUpdating = False For Each ws In ActiveWorkbook.Worksheets Application.StatusBar = "Changing header/footer in " & ws.Name With ws.PageSetup .LeftHeader = vbCr & vbCr & vbCr &B &9 & Range("J2").Text & vbCr & vbCr & Range("J3").Text & vbCr & Range("J4").Text & vbCr & Range("J5") .CenterHeader = vbCr & vbCr & vbCr & Range("J1").Text End With Next ws Set ws = Nothing Application.StatusBar = False End Sub
The problem I have is formatting the header through the VBA script. I found the formatting documentation. I don't know where to use the &B for bold or &nn for font-size in the script. Every place I've put it, breaks the script.