bpeirson
Structural
- Apr 7, 2003
- 147
Here is the code as entered into my MACRO. When I Run the macro the For q = loop will not repeat. The For p = loop will cycle as many times as required, the last 3 cell inputs verify the values of q, p and the cell value in D14 of "Price list". Can anyone spot a flaw in the logic of my MACRO or is it impossible to nest for next loops.
Any help is appreciated.
Dim q As Long
Dim p As Long
Dim t As Long
For q = 1 To Worksheets("Price list"
.Range("d14"
For p = 1 To Worksheets("price list"
.Range("Cutlist_elements"
(1, q)
t = t + 1
Cells(t + 3, 1) = "input data"
Cells(t + 3, 2) = "input data"
Cells(t + 3, 4) = "input data"
Cells(t + 3, 6) = "input data"
Cells(t + 3, 9) = "input data"
Cells(t + 3, 10) = q {confirmation for debugging}
Cells(t + 3, 11) = p {confirmation for debugging}
Cells(t + 3, 12) = Worksheets("price list"
.Range("d14"
{confirmation for debugging}
Next p
Next q
End Sub
Any help is appreciated.
Dim q As Long
Dim p As Long
Dim t As Long
For q = 1 To Worksheets("Price list"
For p = 1 To Worksheets("price list"
t = t + 1
Cells(t + 3, 1) = "input data"
Cells(t + 3, 2) = "input data"
Cells(t + 3, 4) = "input data"
Cells(t + 3, 6) = "input data"
Cells(t + 3, 9) = "input data"
Cells(t + 3, 10) = q {confirmation for debugging}
Cells(t + 3, 11) = p {confirmation for debugging}
Cells(t + 3, 12) = Worksheets("price list"
Next p
Next q
End Sub