VBA: For each cell does not work - Range is change and Out of context

Posted by user1744638 on Stack Overflow See other posts from Stack Overflow or by user1744638
Published on 2012-10-14T09:32:30Z Indexed on 2012/10/14 9:36 UTC
Read the original article Hit count: 165

Filed under:
|
|
|
|

I have problem with for each cell. I have like that :

Set cur_sheet = Worksheets("Sheet2")
Set Rng = cur_sheet.Range("A1", "C1523")

For Each cell In Rng.Cells a=1 next cell

if there is row 370 that I have error message " Run time error 94" Invalid use of Null So I do not know what can I change. This row should be ok, filled with text. Why this FOR is not working properly and change range !! ? 370 rows are proceesed correctly, than it is error.

Do you have any ideas ?

© Stack Overflow or respective owner

Related posts about excel

Related posts about vba