VBA Code for header

  • Thread starter Thread starter Khalil Handal
  • Start date Start date
K

Khalil Handal

Hi,
I have a macro to print a certain range of cells.
I need VB code for Header:
left header "text 1"
center header (a picture) Logo.jpg
right headet (unicode ) "text 2"
Is it possible that the three parts be centered each in its own location of
paper?
How can the font for left header be different from the right header?
 
With ActiveSheet.PageSetup
.CenterHeaderPicture.Filename = "C:\Log.jpg"
.LeftHeader = "&""Arial,Bold""&11Text1"
.RightHeader = "&""Verdana,Italic""&8Text2"
End With


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Hi,
Thanks Bob.
If I added a second line for the RightHeader, will it be centered in
relation to the first line?
ie. the second line is: "Thank You". Will it be centered in relation to
"Text2"

Thanks again
 
Hi,
I tried What you gave me and had a problem with the logo.
Following is the code:

With ActiveSheet.PageSetup
.CenterHeaderPicture.Filename = "D:\Rose\Sc_System\logo_r.jpg"
.LeftHeader = "&""Arial,Bold""&11Khalil Handal"
.LeftHeader = "&""Times New Roman""&11New Street"
.RightHeader = "&""Tohama,Bold""&8Text2 "
End With

Notes:
1- The picture(in the same subfolder) does not show on the page anywhere.
2- I don't see the first line in the LeftHeader. How can I have 3 lines in
the LeftHeader?
3- How to change also the font size?
This is all .
 
Back
Top