Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Does anyone know the code to put a number in the right header... | Excel Discussion (Misc queries) | |||
Does anyone know the code to put a number in the right header and. | Excel Discussion (Misc queries) | |||
Does anyone know the code to put a number in the right header... | Excel Discussion (Misc queries) | |||
VBA Code to Add the same header from my first sheet into 20 sheets | Excel Worksheet Functions | |||
Excel-Header-My Company Name won't work in Header (AT&T) & Time | Excel Discussion (Misc queries) |