Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing Footer Information on Multiples Pages in Worksheet

Status
Not open for further replies.

AustinMan

Technical User
Feb 26, 2003
40
US
Is it possible to change thru VBA the Footer Information for a particular page in XL.

I looked through the help files, VBA and Google.

The HPageBreaks had promise, but it is not working.

Basically, my goal is on Print Preview, on Preview, Page 1 to 3 have no footer, however, page 4 thru 8, have footer information.

Is this even possible?

I know the reason of page header is to be consistent but does it allow some flexibility of when information can be placed.


Thanks in advance for your response.


 
Try this.

Sub Footer()
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = "Enter text"
.RightFooter = ""
End With
End Sub

You can add more, if you start recording a new macro, then create the footer you want, then stop recording, you can then edit the macro to see more properties.

Dan

"It's more like it is now, than it ever has been."
 
Ok, I can call this procedure.

How can I apply particular footer information on a particular page in a worksheet.

Sheet1 has 9 sheets.


On Sheet 1 - On Print Preview, Pages 1 - 3

.Rightfooter = ""

On Sheet 1 - One Print Preview, Page 4 - 6

.Rightfooter = "Something"


What reference do I use of specify the page count??

Thanks!
 
Hi,

I think you will not be able to change header/footer info in the one printout - but that does not mean you cannot achieve what you want.

I would setup with no footers and then print pages 1-3. Then insert footer details and print pages 4-99. Given what is already in this thread you should be well on your way.

Good Luck!

Peter Moran
Two head are always better than one!
 
Nice, Peter.

So...

Record a macro that:

Prints pages 1-3.
Places the header/footers on it.
Prints pages 4 through...
Removes the headers/footers.

Anne Troy
Word and Excel Macros
Coming soon: wX
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top