View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
OssieMac OssieMac is offline
external usenet poster
 
Posts: 2,510
Default Omit header from first page without embedding header in code

See answers inserted below each of your questions.

I'll insert a separate reply with 4 different macros. The comments at the
top of each explains their function. You will find that all your Scenarios
can be accommodated.

If you find all this helpful then if you are logging in on the MS
Communities website then don't forget to answer 'Yes' to the question re was
this post helpful.

Regards,

OssieMac

"ibvalentine" wrote:

OssieMac

Your solution worked beautifully! Thank you! I have one follow-up question
if you can spare another minute or two. (I also think your answer will help
others that will find your solution in a search.)

My problem was with just one long worksheet that would result in several
pages when printed. However, you provided two good tips when applying this
solution to other worksheets.

In Tip 1, you say the code will loop through each worksheet. Does that mean
that the header will be omitted on the first page of each worksheet?


OssieMac's Answer: Yes

Scenario 1: 5 worksheets, all multi-page, all grouped, header in first
worksheet only. When printed will the header print on all worksheets and will
just the first page of the first worksheet be omitted or will the header on
the first page of each worksheet be omitted?


Answer: header on the first page of each worksheet be omitted?


Scenario 2: Same as scenario 1, but this time each worksheet has a header of
its own. Same question as scenario 1.


OssieMac's Answer: header on the first page of each worksheet be omitted?


Thanks again!

John



"OssieMac" wrote:

Afterthought and a couple of tips:

You will need to go through page setup and set the headers before you begin.
if you want the macro to do the headers then the easy way is to record a
macro while inserting them and then insert it where required.

Tip 1:
Your code loops through each worksheet indicating that you want to print
multiple worksheets. Therefore if the headers are the same on all worksheets
then you can save yourself some time by selecting all the worksheets. (Hold
the Ctrl and click on each individual tab) and you only have to set the
headers once and it will be applied to all of the selected worksheets.

Tip 2:
You can also select all the worksheets as one print job and it will print
all the worksheets and if you have page numbering, it will number them all in
sequence. You can run page setup all together as per Tip 1 or you can run
page setup individually with different setup for each worksheet and still
select them all for the print job. However, if printing from a macro, instead
of using
For Each wsSheet In Worksheets, you would need to select all the required
worksheets. You can record a macro to get the code for this.



Regards,

OssieMac