Question Locked

Help needed to deal with "object already loaded" error

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi. I have written some codes that load a text box control during runtime and each text box is given an index (array). Unfortunately, I use
from_resize for redraw and it always run twice
the code that load the control box causing this
error. Please advise.

3 replies

by tony hopkinson

Do the loading of your textboxes in the formLoad event or formactivate.
If you use the latter use a boolean to make sure the load code only fires once.

If you are using resize to move things about when the form is resized do just that.
Don't load them just set left, top width etc as required.

OR

Are you creating a new array of textboxes or adding to it?
If the latter the TextBox(1) will already exist, which would give you the same error.

by onbliss

Is it not possible for you to check if the object is already loaded?

ps:Or you asking how to check?

This discussion is closed to new replies.