Header Font and Range Value

H

Helmut

How can I give a Font size to the Range("N3").Value?

How can I combine the following:

With ActiveSheet.PageSetup
.CenterHeader = "&""Times New Roman,Regular""&14MyHeader"

AND

.CenterHeader = Range("N3").Value
 
A

Andreas Reithmayr

try this:

With ActiveSheet.PageSetup
.CenterHeader = "&""Times New Roman,Regular""" & Range("N3")
End With

Should work!

Best,
Andreas
 
H

Helmut

Andreas, thanks, how can I also change the Font size in the same line?
thanks
Helmut
 
T

Tom Ogilvy

With ActiveSheet.PageSetup
.CenterHeader = "&""Times New Roman,Regular""&14" & Range("N3").Value


Assumes N3 does not start with a number.
 
H

Helmut

Hi Tom,
I have another line WITH number in the "N3" like this:

.CenterHeader = "&""David,Bold""&16" & Range("mesname").Value
.RightHeader = "îñô' îñø:" & Chr(10) & Range("mesnum").Value

btw the funny characters are Hebrew
How can I add "David,Bold" and "&14" into the .RightHeader where "mesnum" =
1234?
 
T

Tom Ogilvy

As prevously posted (and tested)

Sub ABC()
With ActiveSheet.PageSetup
.CenterHeader = "&""Times New Roman,Regular""&14" & Range("N3").Value
End With
End Sub

with the prvevious caution.
 
H

Helmut

Hi Tom,
I have another line WITH number in the "N3" like this:

.CenterHeader = "&""David,Bold""&16" & Range("mesname").Value
.RightHeader = "îñô' îñø:" & Chr(10) & Range("mesnum").Value

btw the funny characters are Hebrew
How can I add "David,Bold" and "&14" into the .RightHeader where "mesnum" =
1234?
 

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