PRB: Compiler Error Implementing ISmartTagAction or ISmartTagRecognizer Interface (282145)
The information in this article applies to:
- Microsoft Excel 2002
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic for Applications 6.0
This article was previously published under Q282145 SYMPTOMS
When you compile a Visual Basic project that uses the ISmartTagAction and ISmartTagRecognizer interfaces, you receive unexpected error messages. This problem occurs when your Visual Basic project includes references to both the Microsoft Smart Tags 1.0 Type Library and the Excel 10.0 Object Library.
CAUSE
The Excel 10.0 Object Library and the Microsoft Smart Tags 1.0 Type Library both include interfaces named ISmartTagAction and ISmartTagRecognizer. If your project references both of these libraries and you implement the interface without fully qualifying the interface name, the compiler attempts to use the first matching interface that it encounters in the project's list of references. If the compiler does not choose the type library you intend to use, a compiler error can occur.
RESOLUTION
To correct this problem, fully qualify the interface name in your Implements statement. To implement ISmartTagRecognizer in the Smart Tags library, use the following:
Implements SmartTagLib.ISmartTagRecognizer
Full qualification ensures that the compiler uses a specific type library and does not rely on the order of project references.
REFERENCES
For more information about using the Implements statement, see the following Microsoft Developer Network (MSDN) Web site:
| Modification Type: | Major | Last Reviewed: | 6/28/2004 |
|---|
| Keywords: | kbCompiler kbpending kbprb KB282145 |
|---|
|