Dr. Demento
Well-known Member
- Joined
- Nov 2, 2010
- Messages
- 618
- Office Version
- 2019
- 2016
- Platform
- Windows
I have the following code and it works appropriately. However, I have decided to have a global constant where I can pick my font and make it be uniform everywhere and if I want to change it, I only have to change a single variable. My questions is: how do I adapt this code such that instead of Calibri in the header, it references the global string constant 'font_univ'??
The variable strFont = "&""[" & font_univ & "]""&10" and it occurs to me that I can eliminate the [Calibri] reference in the CenterHeader completely! Still, don't know how to do that either And, I'm not sure I set up strFont appropriately either; it was originally:
I need all sorts of help. Thanks y'all.
VBA Code:
.CenterHeader = strFont & "File: &F || Sheet: &""[Calibri],Bold""&KDB2929&A&""[Calibri],Regular""&K01+000"
The variable strFont = "&""[" & font_univ & "]""&10" and it occurs to me that I can eliminate the [Calibri] reference in the CenterHeader completely! Still, don't know how to do that either And, I'm not sure I set up strFont appropriately either; it was originally:
VBA Code:
strFont = "&""["Calibri"]""&10"
I need all sorts of help. Thanks y'all.