General discussion

Locked

Working with Controls In Document

By deepnidhi ·
I have a template with a textbox (ActiveX Control).I created a new document based on it. Now, when I am inserting a new textbox in the document, the events of the first textbox are not triggering. Before insertion they are working.
Well! I think the problem is somewhat related to Design mode. If immediately after inserting second box, I toggle the document to design mode and then again switch it back to previous mode then the events are working properly. Please , suggest some help. I have a template with a textbox (ActiveX Control).I created a new document based on it. Now, when I am inserting a new textbox in the document, the events of the first textbox are not triggering. Before insertion they are working.
Well! I think the problem issomewhat related to Design mode. If immediately after inserting second box, I toggle the document to design mode and then again switch it back to previous mode then the events are working properly. Please , suggest some help.

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Working with Controls In Document

by kevin.riggs In reply to Working with Controls In ...

I'm just guessing here because I don't know how you are inserting the textbox but . . .

Is there any chance you are creating a collection of text boxes rather than two or three or four independant text boxes? If you have a collection, then you have to start referencing the relative position in the collection (ie. - text1(0).text or text1(1).text) as opposed to text1.text text2.text.

An easy way to check and see is to look at the names of the text boxes. If the names are the same, thenyou have a collection. If each box has a different name, then this isn't your problem.


If you do have a collection, you can use the text1(index).property or text1(index).method just like you would normally use the text1.property or text1.method.


Hope this helps

Collapse -

Working with Controls In Document

by deepnidhi In reply to Working with Controls In ...

Poster rated this answer

Collapse -

Working with Controls In Document

by deepnidhi In reply to Working with Controls In ...

I am not dealing with a collection. All of my textboxes have different names.

Back to Web Development Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums