View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
RJH RJH is offline
external usenet poster
 
Posts: 44
Default 'For - Next' question

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