Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Set Header and footer automatically

Hi,

I have about 15 sheets (from differente filles) and I would like to
set up the header and Footer just once , is it possible to make a code
in VBA to do this or a function in excelç ?

Can someone help me ?

Thanks in advance


Ricardo Galveia

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default Set Header and footer automatically

hi

have a look at this site by chip pearson it should help you out, the
site has loads of other very helpful stuff on there well worth
checking out

http://www.cpearson.com/excel/headfoot.htm

hope it helps

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Set Header and footer automatically

A couple of questions on how to take this a step further, if I may...

1) When I set up the headers/footers manually via
File-PageSetup-Header/Footer, I am able to make the header/footer into
multiple lines by pressing carriage return inside the text box. How can I do
the equivalent within macro code? Via some format code perhaps?

2) Is there a place somewhere that lists all the possible format codes that
can be used?

Thanks a lot.


"Incidental" wrote:

hi

have a look at this site by chip pearson it should help you out, the
site has loads of other very helpful stuff on there well worth
checking out

http://www.cpearson.com/excel/headfoot.htm

hope it helps


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Set Header and footer automatically

Let me answer my own questions...

1)
http://exceltips.vitalnews.com/Pages...d_Footers.html

2) here are some
http://exceltips.vitalnews.com/Pages...ing_Codes.html
http://exceltips.vitalnews.com/Pages...ata_Codes.html

HOWEVER, if anyone can provide a more definitive/exhaustive list, it would
still be much appreciated.

Thanks.


"rockhammer" wrote:

A couple of questions on how to take this a step further, if I may...

1) When I set up the headers/footers manually via
File-PageSetup-Header/Footer, I am able to make the header/footer into
multiple lines by pressing carriage return inside the text box. How can I do
the equivalent within macro code? Via some format code perhaps?

2) Is there a place somewhere that lists all the possible format codes that
can be used?

Thanks a lot.


"Incidental" wrote:

hi

have a look at this site by chip pearson it should help you out, the
site has loads of other very helpful stuff on there well worth
checking out

http://www.cpearson.com/excel/headfoot.htm

hope it helps


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Set Header and footer automatically

How might the code (sub workbook_beforeprint()) outlined in the referenced
website be modified such that it loops through only the worksheets in the
workbook that are selected instead of all the worksheets in the workbook?
Thanks.


"Incidental" wrote:

hi

have a look at this site by chip pearson it should help you out, the
site has loads of other very helpful stuff on there well worth
checking out

http://www.cpearson.com/excel/headfoot.htm

hope it helps




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Set Header and footer automatically

A couple further quesitons on this code (sub workbook_beforeprint())...

1) If I were to select just two out of all the tabs (12) to file-print,
this code would loop through all tabs and then pop up the printing window
(where I choose printers, etc.). Through out all this time the two tabs that
I selected remain selected. However as soon as I click "ok" on the printing
window, the 2nd tab I selected get de-selected and only the first tab is
printed. Why is that and how can I make it print both/all selected tabs?

2) In (1) above, the looping through all the tabs is painfully slow - for
the 12 tabs it takes something like 2 minutes (I didn't actually time it) to
loop thru. Why might that be and how can I make it run faster? The file is
3.8MB which, in my mind, is not all that big. In fact, once a print or a
print preview is done, the entire workbook becomes very slow and can take
30sec to 1min for the screen to refresh when I scroll within a worksheet. I
am using excel 2003 11.8117.8122 sp2 and win xp pro sp2.

Any help would be appreciated.

"Incidental" wrote:

hi

have a look at this site by chip pearson it should help you out, the
site has loads of other very helpful stuff on there well worth
checking out

http://www.cpearson.com/excel/headfoot.htm

hope it helps


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Header/footer KWhamill Excel Discussion (Misc queries) 2 January 11th 10 05:16 PM
Header and Footer Té Excel Discussion (Misc queries) 3 August 6th 09 03:57 PM
Header and Footer Need Help Excel Worksheet Functions 1 July 7th 06 02:01 AM
header footer M&A_Jack Excel Worksheet Functions 1 March 8th 05 07:42 PM
Changing (Part of) Header Without Changing Footer or Rest of Header Paul Cross Excel Programming 3 May 20th 04 10:42 PM


All times are GMT +1. The time now is 07:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"