ActiveX Contols change names

A

Art Kedzierski

Weird problem: I've created a document template with a form containing
ActiveX input controls (ComboBox, TextBox, etc.) that populates other
portions of the doc (title page, header/footer, etc.). and delivered to
end-users.

Every so often, after opening the template, populating the form and saving
(save as), the names of the controls change incrementally, breaking the
associated underlying VBA code. For example, a TextBox control originally
named "DocNumber" will suddenly become "DocNumber1". This happens to all
controls in the document.

What is causing this and how do I stop it?
 
C

Cindy M -WordMVP-

Hi Art,

Is your code doing anything that affects the controls? Cutting, pasting,
deleting, anything?

What you describe sounds as if Word is replacing the control, and thus
needing to rename it.
Weird problem: I've created a document template with a form containing
ActiveX input controls (ComboBox, TextBox, etc.) that populates other
portions of the doc (title page, header/footer, etc.). and delivered to
end-users.

Every so often, after opening the template, populating the form and saving
(save as), the names of the controls change incrementally, breaking the
associated underlying VBA code. For example, a TextBox control originally
named "DocNumber" will suddenly become "DocNumber1". This happens to all
controls in the document.

What is causing this and how do I stop it?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
A

Art Kedzierski

No, the code does not manipulate any control in that manner. The code
populates ComboBoxes with value arrays and transfer input values to the
caption property of Label controls throughout the document. This doesn't
happen on every system, either. I can't identify a difference between the
affected systems, however.
 
C

Cindy M -WordMVP-

Hi Art,
No, the code does not manipulate any control in that manner. The code
populates ComboBoxes with value arrays and transfer input values to the
caption property of Label controls throughout the document. This doesn't
happen on every system, either. I can't identify a difference between the
affected systems, however.
--
Hmmm. This sounds familiar, but it's been such a long time since I last
encountered the topic...

Since you're seeing it only on certain systems, that does seem the place to
start. Have you tried starting both Word as well as Windows in "Safe Mode"? This
could be an Addin, antivirus or some kind of file management software putting its
fingers in the pie.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top