OFF97: Changes to Custom ActiveX Control Are Not UsedID: Q185473
|
When you modify a custom ActiveX Control that you are using in an Office program, the changes do not appear in the control in the Office program.
This behavior occurs if the following conditions are true:
Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft Support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact the Microsoft fee-based consulting line at (800) 936-5200. For more information about the support options available from Microsoft, please see the following page on the World Wide Web:
http://support.microsoft.com/support/To work around this design limitation, delete the associated .exd and .twd files to allow new files to be created. After you do this, the custom ActiveX Control is updated.
This behavior is by design in Microsoft Office for Windows.
When an ActiveX control is inserted, two associated files are created.
These files contain the Object Type Library of the control and the extended
object members that Visual Basic for Applications or the Office program
adds.
For example, when you insert an ActiveX Control in a Word document,
the control has certain properties, such as .Top and .Width. The control
knows nothing about these properties, but they appear to be part of the
control's object model. This is how the extended object works. The extended
object provides these container-specific members (for example, .Top and
.Width) in addition to the control's members.
These files have file name extensions of .twd and .exd and are created by
Visual Basic for Applications or Office programs. If you insert a
control in a Word document, and if these .exd and .twd files do not exist,
they are created. If they already exist, they are not re-created. This
is why the new definition of the method or the property of the custom
ActiveX Control is not reflected when you modify it.
For more information about getting help with Visual Basic for Applications,
please see the following article in the Microsoft Knowledge Base:
Q163435 VBA: Programming Resources for Visual Basic for Applications
Additional query words: vba
Keywords : kbdta KbVBA kbPowerPt kbWord kbOffice2000 kbExcel97 kbexcel2000 kbpowerpt2000 kbword2000
Version : :; WINDOWS:2000,97
Platform : WINDOWS
Issue type : kbhowto
Last Reviewed: June 21, 1999