An Excel 2003 VBA syntax problem

  Chris the Ancient 12:34 02 Nov 10
Locked

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 10

Wrong key pressed.

To continue...

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

  VoG II 12:42 02 Nov 10

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 10

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 10

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

  Chris the Ancient 13:06 02 Nov 10

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

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

Nintendo Switch review: Hands-on with the intuitive modular console and its disappointing games…

1995-2015: How technology has changed the world in 20 years

This abstract video touches on division in our technologic world

Best alternatives to iTunes for Mac | Best music players for macOS: Free your music from the…