Siebel VB Language Reference > VB Language Reference >
New Operator
The New operator allocates and initializes a new COM object of the named class. Syntax
Set objectVar = New className Dim objectVar As New className
|
|
objectVar |
The COM object to allocate and initialize |
className |
The class to assign to the object |
Returns
Not applicable Usage
In the Dim statement, New marks objectVar so that a new object is allocated and initialized when objectVar is first used. If objectVar is not referenced, then no new object is allocated. NOTE: An object variable that was declared with New allocates a second object if objectVar is Set to Nothing and referenced again.
Related Topics
CreateObject Function Dim Statement Global Statement Service_InvokeMethod Event Static Statement
|