Bookshelf Home | Contents | Index | PDF |
Siebel VB Language Reference > VB Language Reference > Set StatementThis standard VB statement assigns a COM object, such as an application, to a variable. Within Siebel Tools, it is used to create an instance of a Siebel object. SyntaxSet variableName = objectExpression ReturnsUsageThe following example shows how to use the Set statement:
NOTE: If you omit the keyword Set when assigning an object variable, Siebel VB tries to copy the default member of one object to the default member of another. This usually results in a run-time error:
Set differs from Let in that Let assigns an expression to a Siebel VB variable. For example, ExampleThis example creates an Opportunity Siebel business component outside the context of the user interface. The program prevents the user from deleting an account if there are opportunities associated with it. For details on the Siebel VB methods and objects used in this example, read Siebel Object Interfaces Reference. Function BusComp_PreDeleteRecord As Integer Dim iReturn as integer set oBO = theApplication.GetBusObject("Opportunity") With oBC BusComp_PreDeleteRecord = iReturn See AlsoCreateObject Function |
Siebel VB Language Reference |