View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Mike Fogleman Mike Fogleman is offline
external usenet poster
 
Posts: 1,092
Default Working with headers in pagesetup

Dim myvar
Dim hdr
myvar = ??? 'replace the word "Test"
hdr = "14"& myvar

With ActiveSheet.PageSetup
.CenterHeader = "&""Arial,Bold""&hdr"
End With

Should get you close to what you want
Mike F
"OkieViking" wrote in message
...
I want to add a header as below. However, I want to replace the word
"Test"
with a variable. How do I do that and still retain the formatting?

With ActiveSheet.PageSetup
.CenterHeader = "&""Arial,Bold""&14Test"
End With


Thanks