PRB: Error "Bound to Unknown Type" Inserting ATL Control in VBA UserForm (214462)
The information in this article applies to:
- Microsoft Excel 2000
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
- The Microsoft Active Template Library (ATL) 2.0
- The Microsoft Active Template Library (ATL) 3.0
- Microsoft Excel 97 for Windows
- Microsoft PowerPoint 97 for Windows
- Microsoft Word 97 for Windows
- Microsoft PowerPoint 2000
- Microsoft Word 2000
- Microsoft Excel 2002
- Microsoft PowerPoint 2002
- Microsoft Word 2002
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;
REFERENCES
For additional information, see the following article or articles in the
Microsoft Knowledge Base: 181255 How To Implement Enumerated Properties in ATL
Modification Type: | Major | Last Reviewed: | 12/12/2003 |
---|
Keywords: | kbCtrlCreate kbprb KB214462 |
---|
|