Bookshelf Home | Contents | Index | PDF | ![]() ![]() |
Siebel VB Language Reference > VB Language Reference > CreateObject FunctionCreates a new COM automation object. SyntaxCreateObject(application.objectname) ReturnsUsageTo create an object, you first must declare an object variable, using Dim, and then Set the variable equal to the new object, as follows:
To refer to a method or property of the newly created object, use the syntax objectvar.property or objectvar.method, as follows:
Refer to the documentation provided with your Web Client Automation Server application for correct application and object names. Modal or nonmodal forms cannot be displayed from server-based applications. DLLs instantiated by this function should be Thread-Safe. CAUTION: When invoking a COM object, a 440 error message may occur if you pass the wrong number, order, or type of arguments to the COM object. ExampleThis example uses CreateObject to create an Excel worksheet and then edits and saves the worksheet. Sub BtnExcel_Click ' Make Excel visible through the Application object. This example uses CreateObject to create a Word document and then edits and saves the document. Sub BtnWrd_Click See AlsoGetObject Function |
![]() |
![]() ![]() |
Siebel VB Language Reference |