#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default loop a macro

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"

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default loop a macro

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




--
Regards Ron de Bruin
http://www.rondebruin.nl



"jnjwilliams94" <u25776@uwe wrote in message news:6558417c7c6b1@uwe...
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"



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default loop a macro

Thank you - it worked!

Ron de Bruin wrote:
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"


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default loop a macro

Thank you - it worked!

Ron de Bruin wrote:
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"


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
error when running cut & paste macro Otto Moehrbach Excel Worksheet Functions 4 August 9th 06 01:49 PM
link to combobox legepe Excel Discussion (Misc queries) 4 July 26th 06 04:45 PM
Compiling macro based on cell values simonsmith Excel Discussion (Misc queries) 1 May 16th 06 08:31 PM
how to put a loop in a macro? Khoshravan New Users to Excel 4 May 14th 06 01:22 PM
how can i loop a macro Remote help Excel Discussion (Misc queries) 1 July 21st 05 02:57 AM


All times are GMT +1. The time now is 02:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"