I'm trying to print X number of pages with incrementing numbers in TWO cells per page.
Using the code below, i can easily increment one cell per printed page, but i need two.
page 1 should have increments 1 and 2
page 2 should have increments 3 and 4
and so on.
In my testing to this point, i can get page 1 with increments 1 and 2, but page two would have increments 2 and 3, then page three would have increments 3 and 4...
The important cells in Sheet1 are:
B8 = should be the first increment per page
B20 = should be the second increment per page
M11 = user defined number of pages to print
code i have so far follows
also, when i set B20 to "=B8+1" it doesn't seem to matter because B8 is always sequentially 1..2..3...4..5...
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim i As Long
Cancel = True
Application.EnableEvents = False
For i = 1 To .Range("M11").Value
.Range("B8").Value = .Range("B8").Value + 1
.Range("B20").Value = .Range("B8").Value + 2 'playing with this line to see what happens
Application.EnableEvents = True