Bookshelf Home | Contents | Index | PDF |
Siebel VB Language Reference > Methods Reference for Siebel VB > COM Methods > Get COM Object MethodThe Get COM Object method returns the COM object that the pathname argument or the class argument identifies. To assign a variable to an object for use in a Visual Basic procedure, you dimension a variable as an object, and then use the Get COM Object method with the Assign COM Object statement. The examples in this topic reference the SiebelAppServer object, which you define as an object type in your external Visual Basic environment. Format AFormat BFormat CArgumentsThe following table describes the arguments that you can use with this method. Usage for Format AYou can use format A to access a COM object that is stored in a file. For example, the following code dimensions a variable as an object and assigns the payables.xls object to this variable. The Payables.xls file is located in the My Documents directory:
If the Siebel application supports accessing component objects in the file, then you can append an exclamation point and a component object name to the file name. For example:
Usage for Format BYou can use format B to access a COM object of a particular class that is stored in a file. The class argument uses the following format:
Usage for Format CYou can use format C to access the active COM object of a particular class. For example:
If you use format C with a null string ("") in the pathname argument, then Siebel VB returns a new object instance of the class that you specify in the class argument. The preceding example gets an open instance of the Siebel application. The following example instantiates the Siebel application in memory, independent of the user interface:
ExampleThe following example opens an Excel worksheet and places the contents of the Name field of the active business component in this worksheet. The worksheet file must already exist: Sub Button1_Click 'Make Excel visible through the Application object. 'Place some text in the first cell of the sheet. 'Save the sheet. |
Siebel VB Language Reference | Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |