View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default printing question

I am not sure I grasp the intent of your question, but I will take a stab at
it. The code below will print four pages with one row on each page for rows
5 thru 8.

Sub printRows()
For i = 5 To 8
Rows(i).PrintOut
Next
End Sub


"mwam423" wrote:

I have a print macro question. I have a cell that says for example "Print Row"

Print Row = 1 (call this cell A2)

Rows:
1 (A5)
2 (A6)
3 (A7)
4 (A8)
blank after A8

How do I get the cell where Print Row = 1, to change to 2 then 3 then 4 and
then back to 1 once it hits the blank row?

Hope this makes sense, I'm trying to get my print macro to cycle through to
only populated rows, then stop.

I have my template formula based, so all I want it to do, is to start with
1, print the report tab, then go to 2, print the report tab, go to 3, print
the report tab, go to 4, print the report tab then there are no more records
so it should stop and reset itself to 1 so when you hit the button again, it
would cycle back through.