Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

any idea

Posted on 2016-11-07
3
Medium Priority
?
60 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 34

Accepted Solution

by:
Paul MacDonald earned 1000 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 64

Assisted Solution

by:Fernando Soto
Fernando Soto earned 1000 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 64

Expert Comment

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

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

704 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