MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Printing in a loop


Posted by Robert Burge on November 07, 2000 11:44 AM

I'm trying to put information in a pay stub, print it and then move down a row, move that information in a pay stub, and then print that one, etc.. Basically I have a pay stub in the print area and need it working in a loop. Please help!

Thanks
Robert Burge


Posted by Celia on November 09, 2000 12:21 AM


Robert
I think you will need to supply more details before anyone can help.
Celia

Posted by Robert Burge on November 10, 2000 11:18 AM

There's nothing else to it, I have information in rows that I want to transfer to a pay stub, one row at a time, print that stub and then move down to the next row, print that stub and so on.

Thanks
Robert Burge

Posted by Celia on November 10, 2000 3:26 PM

Robert
Nothing else to it? OK, see if the following is what you need.
Select the rows that contain the data and then run the macro which will print each row one at a time.

Sub PrintEachRow()
Dim rw As Range
For Each rw In Selection.Rows
rw.PrintOut
Next
End Sub

Celia

There's nothing else to it, I have information in rows that I want to transfer to a pay stub, one row at a time, print that stub and then move down to the next row, print that stub and so on.

Posted by Robert Burge on November 14, 2000 11:41 AM

Thanks Celia, I'm not totally sure if this is what I'm looking for, but I'll give it a shot. I'm going to have to read the help topics to help me out along the way.

Robert