This sub is creating an infinite loop. I have no idea why or how to fix it. Any help would be greatly appreciated!
Code:
For i = 1 To 51
For r = 6 To 57
Workbooks(Margin).Worksheets(Sheets(i) & Graph1).Activate
Range(HL1).Copy Workbooks(Control).Worksheets("Margin Emails").Cells(r, 4)
Range(HL2).Copy Workbooks(Control).Worksheets("Margin Emails").Cells(r, 5)
Range(HL3).Copy Workbooks(Control).Worksheets("Margin Emails").Cells(r, 6)
Range(CTD1).Copy Workbooks(Control).Worksheets("Margin Emails").Cells(r, 7)
Range(CTD2).Copy Workbooks(Control).Worksheets("Margin Emails").Cells(r, 8)
Range(CTD3).Copy Workbooks(Control).Worksheets("Margin Emails").Cells(r, 9)
Workbooks(Margin).Activate
Worksheets(Sheets(i) & Graph2).Activate
Range(RLPC1).Copy Workbooks(Control).Worksheets("Margin Emails").Cells(r, 10)
Range(RLPC2).Copy Workbooks(Control).Worksheets("Margin Emails").Cells(r, 11)
Range(CRLPC1).Copy Workbooks(Control).Worksheets("Margin Emails").Cells(r, 12)
Range(CRLPC2).Copy Workbooks(Control).Worksheets("Margin Emails").Cells(r, 13)
Workbooks(Margin).Activate
Worksheets(Sheets(i) & Graph3).Activate
Range(NI1).Copy Workbooks(Control).Worksheets("Margin Emails").Cells(r, 14)
Range(NI2).Copy Workbooks(Control).Worksheets("Margin Emails").Cells(r, 15)
Range(CNI1).Copy Workbooks(Control).Worksheets("Margin Emails").Cells(r, 16)
Range(CNI2).Copy Workbooks(Control).Worksheets("Margin Emails").Cells(r, 17)
Workbooks(Margin).Activate
Worksheets(Sheets(i) & Graph4).Activate
Range(PC1).Copy Workbooks(Control).Worksheets("Margin Emails").Cells(r, 18)
Range(PC2).Copy Workbooks(Control).Worksheets("Margin Emails").Cells(r, 19)
Workbooks(Control).Activate
Next r
Next i