What is the diff between the Create Object and Get object?
Answer Posted / abcd
1. CreateObject creates an instance of a class
2. GetObject gets the reference of an running object
to another object
3. Always use CreateObject except for Windows
Management Instrumentation (WMI) and Active Directory
Service Interfaces (ADSI)
The below script demonstrates the use of these two VBScript
functions.
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
Set objWorkbook = objExcel.Workbooks.Add
Set objExcel2 = GetObject(, "Excel.Application")
Set objWorkbook = objExcel2.Workbooks(1)
Set objWorksheet = objWorkbook.Worksheets(1)
objExcel2.Cells(1, 1).Value = "In god I TRUST everything
else I TEST."
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
what controls have you used in your project?
What is the use of Tabledef?
Explain about the basic features of Visual basic?
Scope of API?s can be of different types, what are they Why API functions are Required?
How would you add elements in TreevieW Control?
1.What are the Feactures visual data manager 2.Short note on visual data manager 3.What is data control,its work,properties,methods 4.Needs for OLEDB in vb 5.LIst steps involved in generating christal report 6.What is a recordset 7.Diffrence between RDO and ADO 8.What is an Activex control 9.Advantages of ADO over data control 10.Diffrence between model and modeless form 11.What is the significance of debug window 12.Diffrence between single document and multiple document 13.Explain data report
What is Seek Method which type of record set is available this?
Write the Steps in Creating an ActiveX Control?
How would you create properties by using class Builder Wizard?
Is there any way to pass a variable to a form apart from using global variables?
How can I call a 'hidden' DOS program from VB?
What is DDE?
To validate a range of values for a property whenever the property values changes,which type of property procedure you use?
Explain the types of Views in Listview Control?
How would you run your ActiveX Document Dll?