What is the diff between the Create Object and Get object?

Answers were Sorted based on User's Feedback



What is the diff between the Create Object and Get object?..

Answer / guest


Create Object - To create an instance of an object.
Get Object ? To get the reference to an existing object.

Is This Answer Correct ?    10 Yes 0 No

What is the diff between the Create Object and Get object?..

Answer / 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

More Visual Basic Interview Questions

Advantage of ActiveX Dll over Active Exe.

0 Answers  


How would you activate animation control?

0 Answers  


Write the steps in Creating ActiveX Dll and Active Exe?

0 Answers  


Difference between Recordset and Querydef?

2 Answers   3i Infotech, IBM, TCS,


What does Addressof operator do?

1 Answers  


Explain about ADO control?

0 Answers  


What is the purpose of the ClipControls property on a form or container?

1 Answers  


Explain about trees structures work.

0 Answers  


___ argument can be used to make a menuitem into bold.

0 Answers  


I have several megabytes of memory. Why do I get an "out of memory" error?

0 Answers  


what is the Difference between Declaration and Instantiation an object?

1 Answers  


How would you create properties in ActiveX Control?

0 Answers  


Categories