PRJ: Can't Select OLE Object Using Visual Basic Macro CommandLast reviewed: November 24, 1997Article ID: Q126670 |
The information in this article applies to:
SYMPTOMSIn a macro in Microsoft Project, you cannot select a specific OLE object, such as the third object in your project, using a Visual Basic command.
CAUSEYou cannot select a specific OLE object using the Visual Basic macro language in Microsoft Project because the OLE object is not exposed in the object model in Microsoft Project. In a Visual Basic procedure in Microsoft Excel, you can select or activate a specific OLE object using the OLEObjects object or the OLEObjects method. For example, to select the third object on a worksheet, you can use the following command:
ActiveSheet.OLEObjects(3)Note that you can use the ObjectConvert or the ObjectChangeIcon method with a selected object in Microsoft Project. Additionally, you can use the ObjectInsert method to display the Insert Object dialog box.
MORE INFORMATIONTo view the objects exposed by Microsoft Project, do the following:
REFERENCESFor more information about object reference (definition), choose the Search button in the Visual Basic Reference and type:
object reference |
Additional query words: 4.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |