Hey guys, I've hit a road block here and need a little help. I'm using VBA to allow users to format a custom header and footer on all tabs. I want them to be able to enter the text and allow them to choose the font size and style; however, I cannot get the font style to pull through.
Below is a snippet of what I have so far that currently works. FontSize is the user selected Font Size and LeftHeaderText is the user entered text.
The variable for Font Style is
I also know that inserting a header and footer directly through VBA would look like this:
I cannot figure how to pick up the user entered FontStlye though. Any ideas?
Below is a snippet of what I have so far that currently works. FontSize is the user selected Font Size and LeftHeaderText is the user entered text.
Code:
.LeftHeader = "&" & ThisWorkbook.Worksheets("Instructions").Range("FontSize") & ThisWorkbook.Worksheets("Parameters").Range("LeftHeaderText")
The variable for Font Style is
Code:
ThisWorkbook.Worksheets("Instructions").Range("FontStyle")
I also know that inserting a header and footer directly through VBA would look like this:
Code:
.LeftHeader = "&""Arial,Regular""&8TEXT GOES HERE"
I cannot figure how to pick up the user entered FontStlye though. Any ideas?

Last edited: