Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Standard view
Full view
of .
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1
Headers and Footers

Headers and Footers

Ratings: (0)|Views: 1|Likes:
Published by vasilei_5

More info:

Published by: vasilei_5 on Mar 07, 2014
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less





Headers And Footers
You can use VBA code to create your own headers and footer. This can give you more flexibility than using the standard header and footer options from the age !etup dialog box. There are three regions in header and three in the footer"
LeftHeader, CenterHeader, RightHeader, LeftFooter, CenterFooter,
. All of these properties accept text strings# and are accessible through the $or%sheet.age!etup ob&ect"
Worksheets("SomeSheet").PageSetup.LeftHeader = "Some e!t"
 All of the examples here use
. You can change this to any of the regions listed above.You cannot place bitmap images in the header or footer. 'nstead# place a picture ob&ect somewhere in row one on the wor%sheet# and set (ows To (epeat At Top from the age !etup dialog. This will print below the normal header area.
Cell Values In The Header 
You can include the value of a cell in the header. For example# the following code will put the value of cell B) on !heet* into the header of the activesheet.
#ti$eSheet.PageSetup.LeftHeader = %
Full File Name In The Header 
The following code will place the full file name# including the path# into the header of the active wor%sheet.
#ti$eSheet.PageSetup.LeftHeader = hisWork+ook.Fu**ame
Fonts And Font Sizes
You can insert control codes to customi+e the font# font attributes ,bold# italics# etc-# and font si+e. The control code used in the header string is the ampersand . The code below will create put the follow formatted text in the header.!ome
Bold Courier New Size 10

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->