Hi,
I hope someone can help. The following code breaks at i=257 (assume the condition is true at cell(1, 857) for example), can anyone tell me why? Also is there a way around this?
Worksheets(sheetName).Activate
For i = 1 To 1000
If Worksheets(sheetName).Cells(1, i).Value = checkValue Then
currentRow = i
Exit For
End If
Next i
Thanks in advance.
I hope someone can help. The following code breaks at i=257 (assume the condition is true at cell(1, 857) for example), can anyone tell me why? Also is there a way around this?
Worksheets(sheetName).Activate
For i = 1 To 1000
If Worksheets(sheetName).Cells(1, i).Value = checkValue Then
currentRow = i
Exit For
End If
Next i
Thanks in advance.