$$Excel-Macros$$ Re: For Each loop creates 1004 error

2009-03-09 Thread tiggyboo
Interesting, the only way I could make this work was to change: For Each r In Worksheets(sheet1).Range(Cells(3, 4), Cells(totalRows, 4)) to this: For Each r In Worksheets(sheet1).Range(Worksheets(sheet1).Cells(3, 4), Worksheets(sheet1).Cells(totalRows, 4)) I.e., had to fully qualify the cell

$$Excel-Macros$$ Re: For Each loop creates 1004 error

2009-03-04 Thread Ashish Jain
Hi AI Your code is working fine on my system. Please re-check by closing and opening the file. However it doesn't matter much by try this 1. Make S capital - i.e.take