Bookshelf Home | Contents | Index | Search | PDF | ![]() ![]() ![]() ![]() |
Siebel VB Language Reference > Language Overview >
Object Handling
Objects are reusable blocks of code that can be instantiated or referenced to perform specific tasks. They may be the end products of a software application, such as a spreadsheet, graph, or document. Each software application has its own set of properties and methods that change the characteristics of an object.
Properties affect how an object behaves. For example, width is a property of a range of cells in a spreadsheet, colors are a property of graphs, and margins are a property of word processing documents.
Methods cause the application to perform an action on an object. Examples are Calculate for a spreadsheet, Snap to Grid for a graph, and Auto-Save for a document.
In Siebel VB, you can access Siebel objects and change the properties and methods of that object. This means that you can access an object that is part of the Siebel application by running a VB program external to the Siebel program.
However, before you can use a non-Siebel object in a Siebel VB procedure, you must instantiate the object by assigning it to an object variable. Then attach an object name (with or without properties and methods) to the variable to manipulate the object.
Alternatively, when accessing Siebel objects within Siebel VB you can declare an object as one of the supported Siebel object types. The syntax for doing this is shown in the following example code.
In this example, oBC is not declared "as Object", but rather is declared "as BusComp". Here you are instantiating one of the Siebel object types, the business component (BusComp) object type. You could declare it as an object, but if you want to use the methods associated with the object type, as shown in step 2, you must declare it as the appropriate object type.
Finally, the preceding example ends by setting oBC to "nothing". In keeping with good programming practices, always set an object to "nothing" when it has been instantiated.
NOTE: You can use a similar procedure to access other types of COM-compliant objects. Use the original software application that created them to change properties and methods of the objects. You can see an example in CreateObject Function.
Bookshelf Home | Contents | Index | Search | PDF | ![]() ![]() ![]() ![]() |
Siebel VB Language Reference Published: 18 June 2003 |