Suppose the data rows in the sheet "NewOrder" are from 19 to 173 excluding the headers which gives a total of six pages.
If I fill rows 19 to 26 and then run the macro the "printOrig" sheet shows only the first two pages, but not the rest. But if I write some data in row 173 the sheet print preview shows all the six pages.
The code is currently designed to adapt to the number of records. The fact that it yields 2 pages instead of one when only several records are used is a bug which can be fixed.
If you want to print out empty pages; that can be easily arranged, However if you elect this option; future changes to the layout will present problems.
Please advise of your wishes.
My wish is that when the macro is run; the sheet "NewOrder" will hide the empty rows from range 19:173 and open the sheet "PrintOrig" with only rows containing data in them with the footer. The column that is to be looked for empty row is column "D".
Currently, the footer text appears after the last data row in every page. Couldn't it be made to appear after leaving an empty row so that it would be easy to distinguish between the data rows and page footer texts in every page.
I hope I have made my wish clear.
Thanks in advance for the help.
Note: I do not wish the message to appear each time the macro is run.
Why does the code take a couple of late seconds to work when the macro is run. I mean even when the screen updating lines are inserted. could this be due to a bug or for some other reason?
Why does the code take a couple of late seconds to work when the macro is run. I mean even when the screen updating lines are inserted. could this be due to a bug or for some other reason?
Beats me. On my machine the following times were recorded:
0.47 sec with only 1 record and no printing.
0.97 secs with the table full of data and no printing.
1.64 secs with the table full of data and printing to my inkjet.
However while conducting the test I found a fault at line 250 which would cause a problem when nearly all rows of the table are to be printed. Change line 250 to the following: