Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help for control array of text box in vb 1

Status
Not open for further replies.

ajayas

Programmer
Sep 22, 2001
20
IN
Please help.
I am working on VB6. I got a project which was built on VB4.
One of the form contains a control array of text boxes.
When I run my application, at first instance it runs properly.
I end the project and restart it(I have not ended the vb application)
When I load the above form I get an error of control array like this:
"Control array element 1 does not exist".
or
"Run time error 340, Control array element 1 does not exist".
How to solve this problem.

Not only this. This is an inconsistent problem.
The next time it is not the same error.It may be the error of another element of the same control array like :
"Control array element 5 does not exist".
or
"Run time error 340, Control array element 5 does not exist".

if anybody can help please let me know.
Thank you.
 
Not at all.
I have not created the array at the run time.
Every controls on the form are static.
Nothing is added or removed at runtime.
But since I m not able to get any help I m going to try that.

If u could help me in the above matter please do else please see to the solution given below and say me whether it is appropriate or not.

I am going to load the control array of text again at the load event of the form dynamically.This would upto my knowledge is feasible.
But here too I was bounded by a problem of setting the properties of all the text boxes(which i think will also have to be alloted at the runtime on the load event of the form to each and every text box.
Thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top