bto.zapata
New Member
- Joined
- Jul 5, 2012
- Messages
- 12
Hi there!
i have been trying to give special format to my workbook so that i can have a different header in each page of my excel so it can be ready to print. I've done my research and ended up by deciding to use VBA to do this. this is my code:
this works great
... but the value in "A2" allways appears in arial 12 with black colour
... ¡even if i change it manualy previously!
Does anyone knows hoy to change the font type and font colour of a header using vba?
Thanks!
i have been trying to give special format to my workbook so that i can have a different header in each page of my excel so it can be ready to print. I've done my research and ended up by deciding to use VBA to do this. this is my code:
Code:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
ws.PageSetup.LeftHeader = ws.Range("A2").Value
Next ws
End Sub
this works great


Does anyone knows hoy to change the font type and font colour of a header using vba?
Thanks!
