Siebel VB Language Reference > Methods Reference for Siebel VB > COM Methods >

Initialize COM Object Method


The Initialize COM Object method allocates and initializes a new COM object. It does not return a value.

In the Declare Variable statement, the New argument instructs Siebel VB to allocate and set a new COM object the first time it encounters the object that the objectVar argument identifies. If the code does not reference this object, then it does not allocate a new object.

The Initialize COM Object method does not create a COM object until the first time Siebel eScript uses this object. If Siebel eScript never uses this object, then this method does not create the object. The Create COM Object method creates the object as soon as you call this method. For more information, see Create COM Object Method.

If the objectVar argument contains Nothing, and if you declare an object variable, and if you reference this object again, then New allocates a second object. For more information, see Remove Object Method.

Format

Set objectVar = New className
Dim objectVar As New className

The following table describes the arguments that you can use with this method.

Argument
Description

objectVar

The COM object to allocate and initialize.

className

The class to assign to the object.

Siebel VB Language Reference Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Legal Notices.