loop a macro

J

jnjwilliams94

I would like to be able to loop my macro. I have 750 rows and need to print
out 1 row at a time each on a seperate piece of paper. My macro is the
following:
Range("A2:K2").Select
ActiveSheet.PageSetup.PrintArea = "$A$2:$K$2"
Application.ActivePrinter = "hp officejet 5500 series on Ne00:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"hp officejet 5500 series on Ne00:", Collate:=True

End Sub

Can someone tell me how to get this to continue to "A725:K725"
 
R

Ron de Bruin

Hi jnjwilliams94

You can do this

Dim I As Integer
For I = 1 To 750
Range("A" & I & ":K" & I).PrintOut preview:=True
Next I

Delete preview:=True if it is workin OK
 
D

Don Guillett

Sub printeachrow()
Application.ActivePrinter = "hp officejet 5500 series on Ne00:"


For i = 1 To cells(rows.count,"a').end(xlup).row '750
Range(Cells(i, "a"), Cells(i, "k")).Printout
Next i
End Sub
 
J

jnjwilliams94

Thank you - it worked!
Hi jnjwilliams94

You can do this

Dim I As Integer
For I = 1 To 750
Range("A" & I & ":K" & I).PrintOut preview:=True
Next I

Delete preview:=True if it is workin OK
I would like to be able to loop my macro. I have 750 rows and need to print
out 1 row at a time each on a seperate piece of paper. My macro is the
[quoted text clipped - 8 lines]
Can someone tell me how to get this to continue to "A725:K725"
 
J

jnjwilliams94

Thank you - it worked!
Hi jnjwilliams94

You can do this

Dim I As Integer
For I = 1 To 750
Range("A" & I & ":K" & I).PrintOut preview:=True
Next I

Delete preview:=True if it is workin OK
I would like to be able to loop my macro. I have 750 rows and need to print
out 1 row at a time each on a seperate piece of paper. My macro is the
[quoted text clipped - 8 lines]
Can someone tell me how to get this to continue to "A725:K725"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top