Thread: Looping
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Sean Timmons Sean Timmons is offline
external usenet poster
 
Posts: 1,696
Default Looping

Depends on what you want to do with your loop. If you just want to do it 5
times regardless, you can do a couple things. Easiest would be change
printout copies:= to 5. :-)

If you want to change a value, say your "Value", then something like

For i = 1 to 10
ActiveCell.FormulaR1C1 = "Value"
Range("N2").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Range("N1").Select
"value" = "Value+1
Next i

Course, you may want to do other calculations, so it depends.

BTW, looks like your range.Select lines aren't needed.

"Maggie" wrote:

I need some help ....
How can I loop the following cammand

ActiveCell.FormulaR1C1 = "Value"
Range("N2").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Range("N1").Select

--
MDP