VB error "Control Array element '12297' doesn't exist

Posted on 2011-04-19
Last Modified: 2012-06-27

I have a VB application without the source code. I have been running to some issues lately and I get few error messages when I enable the logs for the application. the logs shows this:

340::Control array element '12297' doesn't exist.
340::Control array element '2352' doesn't exist.
340::Control array element '2442' doesn't exist.

more of these error with random number...

what is this exactly and what does it mean?


Question by:ezzadin
    LVL 38

    Accepted Solution

    Somewhere in the code there is a loop running that is traversing the objects of an array. Either objects are being removed by some other piece of logic and the loop cannot find the missing object or the loop gets to the end of the objects in the array and is expecting another object but not finding it.

    Without access to the source code and a way to modify it and re-compile, there's no way to prevent the error from happening.

    Here's a web site for a description of the error:

    Author Comment

    Thanks for your reply. There are two EXEs, the second one reads a list of data from a table (sql server) and it seems once there are too many data in that table I'm getting that error.

    There were about 1900 records and as soon as I deleted 800 records, the error was gone. This seems to be application design issur.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
    You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
    This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

    737 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

    23 Experts available now in Live!

    Get 1:1 Help Now