Advanced page number question

Copper Contributor

I have an advanced workbook where certain worksheets (call them “V sheets”) have page counts that vary based on data entered, type of viewing selected and filtering macros.  To complicate matters further, some of these are printed via macros in group worksheet selections where both the 1st page number of a V sheet and the number of pages vary impacting both the 1st V sheet starting page number and the start page number for the next worksheet in the group.

 

Auto numbering via a total group print does not work because the format and print settings are different for many of the worksheets in each group so the layered print macros group by setting types and rely on the specific setup and print settings for each worksheet.  I tried to use page setup vba code in print macros and it did not work.

 

I did figure out how to automatically calculate the number of pages based on data and filtering macros which provides the starting page number for the following worksheet in a group, but have to manually enter this number in “page setup, first page number” or in a custom footer using P+x.  It seems there is no way to enter a variable calculated in the worksheet into either of these actions by macro, vba or other.

 

Any ideas or suggestions would be greatly appreciated.

 

Steve

0 Replies