![]() |
|
#4
|
||||
|
||||
|
Quote:
Quote:
If it comes up with an error and you click End, it will not execute the rest of the code which would have put things as you want. Quote:
The reason no line was showing was that your code found the page break (which is the cell that is printed at the top of the next page) and added a bottom-of-cell line to the row above it. This is OK most of the time, until the row above the page break is also hidden, so any borders to that row aren't seen. I had to move back up, row by row, looking for the next visible row above the page break and added the line to that. There are quite a lot of changes to the code: Moved it to a standard code-module (having it in a sheet's code-module risks you losing it should you delete the sheet, and anyway, it makes no sense to have in a sheet's code module when it's working on multiple sheets). Added a bit to embellish the Totals row. For the code to work, the code has to switch the sheet it's working on to page break preview view, and for that to happen the sheet needs to be the active sheet. So while that happens, there's a danger that the sheet which was the active sheet before the macro runs is not the same as the one that is active after it has run. That has been addressed. |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Table styles - First column shading with bottom line on page break
|
NicB | Word Tables | 2 | 02-20-2019 03:05 AM |
| Paginate table so cell headings appear top of page instead bottom page when no room bottom page | mtcn | Word Tables | 5 | 12-11-2014 12:49 PM |
get rid of line above page numbers at bottom of pages.
|
Joanrichmond | Word | 1 | 02-11-2014 12:57 PM |
line and ?object at bottom of page in word 2007 doc
|
btdaniel | Word | 10 | 07-23-2012 03:03 AM |
Horizontal line at bottom and top each page
|
BrutalLogiC | Word | 1 | 07-03-2011 02:22 AM |