I have the code:
What I want to know is how to use multiple For/As long tasks set inside each other a certain way, and describe when they should occur. Ie, i want the above task to repeat ten times times, and after each time to do a different task. I would think you could write it like this but it doesn't work:
Code:
Option Explicit
Sub runner()
Dim a As Long
For a = 11 To 1515 Step 1
Do Until Range(Cells(2, 1), Cells(2, 1)) > a
Range(Cells(2, 1), Cells(2, 1)).CalculateRowMajorOrder
Range(Cells(13, 392), Cells(13, 392)).CalculateRowMajorOrder
Range(Cells(a, 1), Cells(a + 150, 1154)).CalculateRowMajorOrder
Loop
Next a
End Sub
What I want to know is how to use multiple For/As long tasks set inside each other a certain way, and describe when they should occur. Ie, i want the above task to repeat ten times times, and after each time to do a different task. I would think you could write it like this but it doesn't work:
Code:
Option Explicit
Sub runner()
Dim a As Long
For b = 1 To 10 Step 1
For a = 11 To 1515 Step 1
Do Until Range(Cells(2, 1), Cells(2, 1)) > a
Range(Cells(2, 1), Cells(2, 1)).CalculateRowMajorOrder
Range(Cells(13, 392), Cells(13, 392)).CalculateRowMajorOrder
Range(Cells(a, 1), Cells(a + 150, 1154)).CalculateRowMajorOrder
Loop
Next a
Range(Cells(5, 1), Cells(5, 1)).CalculateRowMajorOrder
Next b
End Sub