PRB: OLE Automation Err: Method Not Applicable for This ObjectLast reviewed: September 29, 1997Article ID: Q115859 |
The information in this article applies to:
- Standard and Professional Editions of Microsoft Visual Basic for Windows, version 3.0
SYMPTOMSCertain valid OLE Automation methods cause the following error in Visual Basic:
Method not Applicable for This Object. CAUSEThis 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.
RESOLUTIONTo 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.
MORE INFORMATION
Steps to Reproduce Behavior
Keywords : IAPOLE vbwin GnrlVb kberrmsg kbprg Technology : kbole kbvba Version : WINDOWS:3.0 Platform : WINDOWS Issue type : kbprb |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |