Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / June 2007

Tip: Looking for answers? Try searching our database.

VBA Code for header

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Khalil Handal - 22 Jun 2007 06:09 GMT
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?
Bob Phillips - 22 Jun 2007 09:24 GMT
With ActiveSheet.PageSetup
       .CenterHeaderPicture.Filename = "C:\Log.jpg"
       .LeftHeader = "&""Arial,Bold""&11Text1"
       .RightHeader = "&""Verdana,Italic""&8Text2"
   End With

Signature

HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

> Hi,
> I have a macro to print a certain range of cells.
[quoted text clipped - 5 lines]
> of paper?
> How can the font for left header be different from the right header?
Adel Handal - 22 Jun 2007 11:16 GMT
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

>    With ActiveSheet.PageSetup
>        .CenterHeaderPicture.Filename = "C:\Log.jpg"
[quoted text clipped - 11 lines]
>> of paper?
>> How can the font for left header be different from the right header?
Khalil Handal - 22 Jun 2007 12:58 GMT
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 .

>    With ActiveSheet.PageSetup
>        .CenterHeaderPicture.Filename = "C:\Log.jpg"
[quoted text clipped - 11 lines]
>> of paper?
>> How can the font for left header be different from the right header?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.