Solved

any idea

Posted on 2016-11-07
3
26 Views
Last Modified: 2016-11-26
Any idea on how to fix this in vb?

[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index]


Message: Out of Range
Error Status: 500
Error Number: 385040
Error Type: System.ArgumentOutOfRangeException
0
Comment
Question by:shwelopo
  • 2
3 Comments
 
LVL 34

Accepted Solution

by:
Paul MacDonald earned 250 total points (awarded by participants)
ID: 41877106
You're looking for an item in a list by its index number.  The number you're using is not a valid list index.  That could be for any number of reasons, and there's not enough information here to say why.

Start by verifying the length (how many items are in the list) of the list.  Then verify the index you're looking for.
1
 
LVL 62

Assisted Solution

by:Fernando Soto
Fernando Soto earned 250 total points (awarded by participants)
ID: 41877149
The best that can be said about this is that you are attempting to access an Array or List or some object that takes an index but the index you are attempting to use is outside the valid range. For example if you have an array that can be accessed with and index between 0 and 100 the only valid indexes that can be used in any integer between 0 and 100 inclusive, so using an index of -1 or 101 fall outside the valid range and will give the error you are getting.

Please post the code where this error is happening.
1
 
LVL 62

Expert Comment

by:Fernando Soto
ID: 41902206
Both solutions would be where to look with this error.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now