Headers and Footers by VBA?

N

Nav

Hello

I am using Office 2003, and have headers and footers on some 40 sheets (not
the 1st sheet and not the last sheet) that are all the same (and some 40
files that each have their own headers/footers). However as each of these
sheets is set to print on page 1 of 1 the print area is different for each
one.

As the print area is different the size of the headers and footers keep
changing. Is there a way to fix the font and size etc.. so regardless of the
print area size the headers and footers all remain the same size, either via
VBA or using the settings in Excel.

Please note that letter heads are not an option, and the footer page x of x
would still need to be fixed in size.

Any help appreciated.

Thank you and regards,
Nav
 
J

JLGWhiz

AFIK, you just have to leave enough margin on your print area to allow for
the headers and/or footers. That is controlled in your page set up, which
can be done manually or by code. Check the help files for details.
 
N

Nav

Hello

Thank you for your reponse but maybe I wasn't totally clear. By adjusting
the margins it is possible to place the Header/Footer in the same location at
all times. However when you select a different sized print area to print 1
page wide by 1 page - depending on the amount of information the header and
footer gets re-sized. Is there any way to make sure the header and footer do
NOT resize with the rest of the data?

Regards, Nav
 
J

JLGWhiz

I believe that when it zooms for fit to page, it zooms evetything
proportionately. One way around that is to specifically size the print areat
with font size but there might be drawbacks to that.
 
N

Nav

Hi

Is it not possible to do some form of VBA coding so that the Zoom factor for
the header and footer always = 100%?
 
G

Gord Dibben

Nav

Set the footer fontsize via VBA

Sub Footer22()
With ActiveSheet.PageSetup
.RightFooter = "&""Algerian,Regular""&18" & "myfooter"
End With
End Sub

Will be independent of page zoom size.


Gord Dibben MS Excel MVP
 
N

Nav

Hello Gord

Thank you for your reponse but I have tried this and it does not work. I
can send an example file, if it would make it easier.

Regards, Nav
 

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