any body know how can i use different font in centerheader
using vb to excel
i use this to change to bold
xlsheet.PageSetup.CenterHeader = "&B" & "Hello"
Printable View
any body know how can i use different font in centerheader
using vb to excel
i use this to change to bold
xlsheet.PageSetup.CenterHeader = "&B" & "Hello"
I don't know the answer, but if I were looking for the answer, I'd look in the object browser
Admittedly this one wasn't fantastically documented (if it was in the help files at all)! What you can do for another time is create a macro, carry out the procedure (i.e. like setting the font on the center header), then stopping the macro and looking at the code it created by hitting Alt+F11 to get into the VBA IDE, then going into the module1.bas module in the project explorer.By the way, we now have a new VBA forum for any Excel related vba questions too, please post there next time...VB Code:
ActiveSheet.PageSetup.CenterHeader = "&""Comic Sans MS,Regular""SampleText"