sum at each page break

N

Newbie

I have a worksheet that can span multiple pages. The requirement is to have
a sum of each page and a running total at the bottom of each page.
At the moment we have to create the worksheet so that the form prints on an
A4 sheet with the necessary formulae in fixed positions.

Problem to Solve:
Is it possible to just have a worksheet with the title headings etc just set
to print at the top of each page and for the necessary page totals and
running total to be automatically calculated once excel has determined where
the page break will be?
If yes, how? My programming knowledge of excel is limited so any help
greatly appreciated

Thanks
 
N

NickHK

If the length of the report is a static, then it is not a problem to set and
print each time. But I doubt that is what you mean.
Whilst possible to make the dynamic version, you will have to find the end
of the page in the _BeforePrint, using the HPageBreaks collection, then
calculate or take from a hidden column the required values.
Insert these into the necessary cells (or footer).
Repeat for each page.

Personally, I would do the report in Access, with data from a linked table,
then Access will calculate it all for you once you have set up the report.
Or use one of VB6 Printer replacement classes that should support printing
to the Printer. Then you know exactly where you are on the page.

NickHK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top