Hi,
Got a problem with a For Each loop
This is my code:
Sub D()
Worksheets("DG"
.Select
For Each cell In Worksheets("CDS"
.Range(Cells(1, 1), Cells(1, 1).End(xlDown)).Cells
Unfortunately it bombs out at the For Each line. I have tried different alternatives and it appears to fall over as soon as I put in the worksheets(""
part of the for each range reference. Can you not call a for each loop reference from a different sheet to the active one?
Many thanks,
Ig
Got a problem with a For Each loop
This is my code:
Sub D()
Worksheets("DG"
For Each cell In Worksheets("CDS"
Unfortunately it bombs out at the For Each line. I have tried different alternatives and it appears to fall over as soon as I put in the worksheets(""
Many thanks,
Ig