Hi All,
I need to place a page break after values change in Col B. Does anyone have a snipit of code, I can pop in?
Thx
Hi All,
I need to place a page break after values change in Col B. Does anyone have a snipit of code, I can pop in?
Thx
And where would the page break go; below the last used cell in col B?
Is it a vertical or horizontal break?
The page break would be horizontal and be placed between the cells with different values.Originally Posted by GTO
Thanks
Greetings Nosstech,
...page break after values change in Col B...According to your first descript, every time a value changes in any cell in column B, a pager break should be inserted somewhere......and be placed between the cells with different values...
And per the the second descript, if B1 = 5, B2 = 934, B3 = 909, etc - there would be a page break at each row.
Here is a horizontal page break between rows 30 and 31, on Sheet1 (codename, not tab name).
[vba]Sheet1.HPageBreaks.Add Before:=Sheet1.Cells(31, 1)[/vba]
I would suggest attaching an example workbook and a better description of what is likely to be happening. IE - There are several different ranges in Col B and users may be inserting rows as they enter data, or, There is one contiguoius range, or etc.
This way someone could probably provide a solution as to resetting page breaks as necessary...
Hope this helps,
Mark