Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8531001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:23:03+00:00 2026-06-11T09:23:03+00:00

For i As Integer = 0 To _rows.Count If (_rows(i).LeftOffset > largestOffset) Then largestOffset

  • 0
    For i As Integer = 0 To _rows.Count
        If (_rows(i).LeftOffset > largestOffset) Then
            largestOffset = _rows(i).LeftOffset
        End If
    Next i

    For i As Integer = 0 To _rows.Count

This code is never getting to the second for, I can put a breakpoint on the End If in there and it triggers for _rows.Count like it should, but then if there’s a breakpoint on the second for or anything after it it’s never reached. There’s no error message, the program doesn’t freeze or anything and it behaves exactly as if I had done:

    For i As Integer = 0 To _rows.Count
        If (_rows(i).LeftOffset > largestOffset) Then
            largestOffset = _rows(i).LeftOffset
        End If
    Next i

    Return

    For i As Integer = 0 To _rows.Count
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T09:23:04+00:00Added an answer on June 11, 2026 at 9:23 am

    It should be _rows.Count-1 as the upper bound. The last time round the loop will fail with an IndexOutOfRangeException.

    I have found that in a few places in VB.net, especially in Form_Load, errors are not shown up by the debugger, and the Sub just exits silently, and the program continues. A try…catch block around it will catch an exception however.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to fill in 2..N integer series into filtered/visible range. This code fills
I have the following code: Dim i As Integer = dtResult.Rows.Count For i =
Integer c=0; DatabaseHelper dbh1 = new DatabaseHelper(this); Cursor ca = dbh1.getReadableDatabase().query(DatabaseHelper.TABLE_NAME, null, null, null,
try{Integer.parse(Abhishek);} catch(NumberFormatException e){} catch(Exception e){} If for the above piece of code, if NumberFormatException
My Application uses For...Next loops to read a spreadsheet into a DataSet and then
This piece of code grabs a customers hire record using their hire ID and
I have a bit of code thats not working and can not find out
I want to get the rows count of the DataSet , but the code
In my form3 i have this code Private Sub Form3_Load(ByVal sender As System.Object, ByVal
I create a CSV file by getting a datatable then looping through that datatable

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.