View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Colo[_105_] Colo[_105_] is offline
external usenet poster
 
Posts: 11
Default 'For - Next' question

Hi RJD,

Why you don't simply use For RowNdx = 1 to 150?
I think we need to know the whole code inside of the For Next looping.


--
Regards,
Colo
http://www.puremis.net/excel/


"RJH" wrote in message
...
Why wouldn't this statement bail out after 150 rows?

For RowNdx = Sheets(1).Cells(1, 3).Row To Sheets(1).Cells(150, 3).Row Step

1

I use a 'If RowNdx 150 then exit sub' in my loop to bail out when

needed,
but I'm sure there's a better way.

Thanks for the help.

RJH