Discussion:
|
This particular example grabs a value from a cell in the workbook. Suppose you want to report for several departments. So, you autofilter the data, type the particular department name into cell A3, and print. Change the autofilter to another department, change A3 again, and print. This code works in the workbook before print event, so it isn't good if you want to use a different header and/or footer on each worksheet.
|