PRB: OLE Automation Err: Method Not Applicable for This Object (115859)
The information in this article applies to:
- Microsoft Visual Basic Standard Edition for Windows 3.0
- Microsoft Visual Basic Professional Edition for Windows 3.0
This article was previously published under Q115859 SYMPTOMS
Certain valid OLE Automation methods cause the following error in Visual
Basic:
Method not Applicable for This Object.
CAUSE
This occurs if the method is a reserved word in Visual Basic. For example,
Close is a reserved word in Visual Basic. If you try to use Close in an OLE
Automation command, the Visual Basic parser complains and gives you the
error message.
RESOLUTION
To use OLE Automation methods that are reserved words in Visual Basic, use
the [] notation. For example, wrap the word Close in square brackets. This
stops Visual Basic from trying to interpret Close as a Visual Basic
statement.
Modification Type: | Major | Last Reviewed: | 10/29/2003 |
---|
Keywords: | kberrmsg kbprb kbProgramming KB115859 kbAudDeveloper |
---|
|