Microsoft KB Archive/214462

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

Article ID: 214462

Article Last Modified on 1/24/2007

-

APPLIES TO


 * Microsoft Excel 2000 Standard Edition
 * Microsoft Visual C++ 5.0 Enterprise Edition
 * Microsoft Visual C++ 6.0 Enterprise Edition
 * Microsoft Visual C++ 5.0 Professional Edition
 * Microsoft Visual C++ 6.0 Professional Edition
 * Microsoft Visual C++ 6.0 Standard Edition
 * Microsoft ActiveX Template Library 2.0
 * Microsoft ActiveX Template Library 3.0
 * Microsoft Excel 97 Standard Edition
 * Microsoft PowerPoint 97 Standard Edition
 * Microsoft Word 97 Standard Edition
 * Microsoft PowerPoint 2000 Standard Edition
 * Microsoft Word 2000 Standard Edition
 * Microsoft Excel 2002 Standard Edition
 * Microsoft PowerPoint 2002 Standard Edition
 * Microsoft Word 2002 Standard Edition

-



This article was previously published under Q214462



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;

