Article ID: 126670
Article Last Modified on 1/19/2007
APPLIES TO
- Microsoft Project 98 Standard Edition
- Microsoft Project 4.1 Standard Edition
- Microsoft Project 4.1a
- Microsoft Project 4.0 Standard Edition
- Microsoft Project 4.0 for Macintosh
This article was previously published under Q126670
SYMPTOMS
In 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.
CAUSE
You 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.
REFERENCES
For more information about object reference (definition), choose the
Search button in the Visual Basic Reference and type:
Keywords: kbcode kbprb kbprogramming KB126670