OLE Automation Err Msg: Method Not Applicable (108661)
The information in this article applies to:
- Microsoft Excel for Windows 95
- Microsoft Excel for Windows 5.0
- Microsoft Visual Basic Standard Edition for Windows 2.0
- Microsoft Visual Basic Standard Edition for Windows 3.0
- Microsoft Visual Basic Standard Edition for Windows 4.0
This article was previously published under Q108661 SYMPTOMS
When you run code in a Microsoft Visual Basic version 3.0 application and
the code uses a method or property of an object linking and embedding (OLE)
automation object, you may receive the following error message
Method not applicable for this object
CAUSE
Some of the methods and properties of OLE Automation objects are
keywords in Visual Basic version 3.0 and will cause the error
message above when you use them in a Visual Basic application.
WORKAROUND
To use a method or property of a Microsoft Excel object in a Visual
Basic application when the method or property is a Visual Basic
keyword, use square brackets ([]) around the keyword in the Visual
Basic code. For example, to use the Close method of the Microsoft
Excel Workbooks object in a Visual Basic application, use the
following syntax:
REFERENCES
For more information about the GetObject Function, choose the Search
button in Microsoft Visual Basic Help and type:
Modification Type: | Minor | Last Reviewed: | 10/10/2006 |
---|
Keywords: | kbProgramming KB108661 kbAudDeveloper |
---|
|