there seems to be quite some ideas out there for how to solve my problems, but I really cant seem to make any of them to work
What I need, and many with me, would be a VBA function that, when a sheet is printed, is able to update a cell, that is repeated on each paper printed, with the current page number. This could be solved in sofisticated ways by counting page breakes and so on and determine wich range of cells is printed right now and i between which breaks they reside. This is really not needed. All one actually need is a counter that increments by one each time a new paper is printed. I hope. And which interacts such way that the wanted cell is updated with a new value.
Now. I do have a function, TotalPages(), that determines the total number of pages in the active sheet, and which also works,
and I also have a function named ThisPage() to give the current page. This does not work.
In the cells at top of my sheet which I have selected to be reprinted on each page I have one cell with the following formula.
When I force ThisPage() to return a fixed number, say 1, the cell will be given the value
For a 3 paged sheet, So this is the choosen format I want to have the information printed.
But, When One do print a sheet, I guess there must be some mechanism to update the same cell with new numbers each time a set page break is reached. I dont know how that should be done at all, so please give some hints if possible at all.
Maybe I must create a new function that print the entire string in one and which is called each time excells printer driver routine is called and which updates the cell with correct data each time a page break is reached. But I really do not know where to start.
If you can contribute , please fill in. I have read quite some examples on similar things these last few days but I have not found any solution yet. Well, atleast no solution that actually works.
Best regards and thanks in advance