An Excel 2003 VBA syntax problem

  Chris the Ancient 12:34 02 Nov 2010

I'm stuck!

Within a print routine macro, I have a header that is produced from a value contained in a cell using...

With ActiveSheet.PageSetup
.RightHeader = Range("O2").Value
End With

...which works fine

However, I haven't been able to find a way to adjust the font as in...

With ActiveSheet.PageSetup
.RightHeader = "&""Arial,Bold""&24"Some text goes here"
End With

  Chris the Ancient 12:36 02 Nov 2010

Wrong key pressed.

To continue...

How can I combine the formula derived header statement with the format statement?

  VoG II 12:42 02 Nov 2010

Here's an example Chris

ActiveSheet.PageSetup.CenterFooter = "&""Times New Roman,Regular""&14" & Sheets("Employees").Cells(i, 1).Value

  Chris the Ancient 12:51 02 Nov 2010

Modified (slightly) to...

.RightHeader = "&""Arial,Bold""&24" & Range("O2").Value

... and does exactly what I need.

Many thanks!

BTW, you seem to be very quick with answers for me these days. Are you sitting, and gazing, at PCA as much as I seem to do now that I have retired?

  VoG II 12:57 02 Nov 2010

No, I just looked in and there was your thread sitting at the top of the page!

  Chris the Ancient 13:06 02 Nov 2010

Well, you must have a secret sense of immaculate timing, then.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Xiaomi Mi Mix 2 review

Halloween Photoshop & Illustrator tutorials: 20 step-by-step guides to creating spook-tacular…

iPhone X news: Release date, price, new features & specs

Comment créer, modifier et réinitialiser un compte Apple ?