PRB: Error "Bound to Unknown Type" Inserting ATL Control in VBA UserForm

ID: Q214462


The information in this article applies to:
  • Microsoft Visual C++, 32-bit Editions, versions 5.0, 6.0
  • The Microsoft Active Template Library (ATL), versions 2.0, 3.0
  • Microsoft Office 2000 Developer


SYMPTOMS

When inserting your ATL control in a Microsoft Office 97 VBA UserForm, you crash in OLEAUT32.DLL, or receive the following error:

Bound to unknown type.


CAUSE

This is typically caused by ATL controls that declare enumerated types in their IDL file without specifying a tag.

For example, you may have an enumerated type such as the following in your IDL file:


   typedef enum {
      myEnumVal1 = 1, myEnumVal2 = 2
   } MyEnum; 


RESOLUTION

To ensure that your type library is suitable for all containers, you should provide a tag for all enumerated types. For example:


   typedef enum MyEnumTag {
      myEnumVal1 = 1, myEnumVal2 = 2
   } MyEnum; 


REFERENCES

For additional information, please see the following article(s) in the Microsoft Knowledge Base:

Q181255 How To Implement Enumerated Properties in ATL

© Microsoft Corporation 1999, All Rights Reserved.
Contributions by Joe Crump, Microsoft Corporation

Additional query words: TYPE_E_UNDEFINEDTYPE 80028027 -2147319769

Keywords : kbActiveX kbATL kbATL200 kbCtrlCreate KbVBA kbVC kbVC500 kbVC600 kbATL300 kbGrpDSO kbOffice2000
Version : WINDOWS:2.0,3.0; winnt:5.0,6.0; :
Platform : WINDOWS winnt
Issue type : kbprb


Last Reviewed: August 30, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.