ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   print procedural question (https://www.excelbanter.com/excel-programming/376524-print-procedural-question.html)

Gary Keramidas

print procedural question
 
i have an application that prints production line information. i use an array to
filter and print each production line's item list. this works fine when one copy
is printed. when 2 or more copies are printed, it puts both copies of production
line 1 together, line 2 together and so on. so the client has to manually sort
through and group all 8 production lines into 1 report.

my question is:

is there a way i can print the entire range (no filter) and have excel divide
the production lines (the production line number is in column V) so the next
production line always starts a new page?

this way i could print and keep all 8 production lines together.
--


Gary




NickHK

print procedural question
 
Gary,
So you need to insert HPageBreaks at the correct places ?
Then print the whole WS ?

NickHK

"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
i have an application that prints production line information. i use an

array to
filter and print each production line's item list. this works fine when

one copy
is printed. when 2 or more copies are printed, it puts both copies of

production
line 1 together, line 2 together and so on. so the client has to manually

sort
through and group all 8 production lines into 1 report.

my question is:

is there a way i can print the entire range (no filter) and have excel

divide
the production lines (the production line number is in column V) so the

next
production line always starts a new page?

this way i could print and keep all 8 production lines together.
--


Gary






Gary Keramidas

print procedural question
 
yes nick, thanks.

i think i have most figured out. remember, it's a filtered range.
i have an array with the production line numbers in it. then i used this code to
create the manual page breaks. the only thing i can't seem to do is put the
production line number on the heading of each page.

arr = Array("1", "2", "6", "7", "8", "9")
For z = LBound(arr) + 1 To UBound(arr)
For Each cell In .Range("V23:V345").SpecialCells(xlCellTypeVisible)
If cell.Value = arr(z) Then
ws.Rows(cell.Row).PageBreak = xlPageBreakManual
GoTo nxt
End If
Next
nxt:
Next
--


Gary


"NickHK" wrote in message
...
Gary,
So you need to insert HPageBreaks at the correct places ?
Then print the whole WS ?

NickHK

"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
i have an application that prints production line information. i use an

array to
filter and print each production line's item list. this works fine when

one copy
is printed. when 2 or more copies are printed, it puts both copies of

production
line 1 together, line 2 together and so on. so the client has to manually

sort
through and group all 8 production lines into 1 report.

my question is:

is there a way i can print the entire range (no filter) and have excel

divide
the production lines (the production line number is in column V) so the

next
production line always starts a new page?

this way i could print and keep all 8 production lines together.
--


Gary








NickHK

print procedural question
 
Gary
Something like:

with worksheet(1)
For z = LBound(arr) + 1 To UBound(arr)
.PageSetup.CenterHeader = "production Line Number: " & arr(z) 'Or
whatever
.printout z,z
next
end with

"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
yes nick, thanks.

i think i have most figured out. remember, it's a filtered range.
i have an array with the production line numbers in it. then i used this

code to
create the manual page breaks. the only thing i can't seem to do is put

the
production line number on the heading of each page.

arr = Array("1", "2", "6", "7", "8", "9")
For z = LBound(arr) + 1 To UBound(arr)
For Each cell In

..Range("V23:V345").SpecialCells(xlCellTypeVisible )
If cell.Value = arr(z) Then
ws.Rows(cell.Row).PageBreak = xlPageBreakManual
GoTo nxt
End If
Next
nxt:
Next
--


Gary


"NickHK" wrote in message
...
Gary,
So you need to insert HPageBreaks at the correct places ?
Then print the whole WS ?

NickHK

"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
i have an application that prints production line information. i use an

array to
filter and print each production line's item list. this works fine when

one copy
is printed. when 2 or more copies are printed, it puts both copies of

production
line 1 together, line 2 together and so on. so the client has to

manually
sort
through and group all 8 production lines into 1 report.

my question is:

is there a way i can print the entire range (no filter) and have excel

divide
the production lines (the production line number is in column V) so the

next
production line always starts a new page?

this way i could print and keep all 8 production lines together.
--


Gary











All times are GMT +1. The time now is 06:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com