Discussion Locked

Working with Controls In Document

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

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.

3 replies

by kevin.riggs

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

This discussion is closed to new replies.