Changing font in custom header that is based on cell value

M

michaelberrier

The vb code for setting a font size for a custom header that is static
is this:

..CenterHeader = "&16NREMTP"

But what if your header is set to a particular cell value, like this:

..CenterHeader = Range("A1") ?

I've tried putting the &16 everywhere with and w/o quotes and it fails
every time.

Thanks.
 
G

Guest

Michael,

I appear to have lost the original,

The code for font size is &nn so if you set the font size to 16 in cell A1
type
&16NREMTP

or

in the vb line type asuming this is within the With ActiveSheet.PageSetup

..CenterHeader = "&16" & Range("A1")

You may like to check that you are correctly picking up the value in cell A1
with a msgbox.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top