Hi,
I am having an issue with an Excel tool we are using to produce reports. The report is a series of pages in an Excel worksheet. The users asked me to add in the ability to choose which pages are printed off, so I wrote a macro that would copy everything to a new sheet, delete superfluous rows based on users selecting 'include' or 'exclude' next to a list of all the pages in the sheet (I have formulae associating each page to the corresponding rows), then pdf the result.
Although this normally works, I am having two problems that occur sometimes after the sheets have been deleted (depending on the pages selected to be deleted):
1) Excel adds in automated page breaks just below my manual ones. This means I often get pages that are simply a heading and two rows, then the actual content is on the next page.
2) Not all the pages are included in the report - the last few pages are often missed out.
The print area does cover all the pages.
Does anyone have any idea how I can delete rows and still keep my manual page breaks without Excel adding in automated page breaks too? I have been trying for ages and can't solve it or find anything on the Internet.
The solution MUST be something that is automated - the users are not expected to copy / paste / delete / add / pdf anything themselves.
Thanks
I am having an issue with an Excel tool we are using to produce reports. The report is a series of pages in an Excel worksheet. The users asked me to add in the ability to choose which pages are printed off, so I wrote a macro that would copy everything to a new sheet, delete superfluous rows based on users selecting 'include' or 'exclude' next to a list of all the pages in the sheet (I have formulae associating each page to the corresponding rows), then pdf the result.
Although this normally works, I am having two problems that occur sometimes after the sheets have been deleted (depending on the pages selected to be deleted):
1) Excel adds in automated page breaks just below my manual ones. This means I often get pages that are simply a heading and two rows, then the actual content is on the next page.
2) Not all the pages are included in the report - the last few pages are often missed out.
The print area does cover all the pages.
Does anyone have any idea how I can delete rows and still keep my manual page breaks without Excel adding in automated page breaks too? I have been trying for ages and can't solve it or find anything on the Internet.
The solution MUST be something that is automated - the users are not expected to copy / paste / delete / add / pdf anything themselves.
Thanks