Help needed to deal with "object already loaded" error

By kw_ng ·
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.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

Visual Basic one assumes ?

by Tony Hopkinson In reply to Help needed to deal with ...

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.


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.

Collapse -


by onbliss In reply to Help needed to deal with ...

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

ps:Or you asking how to check?

Related Discussions

Related Forums