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
Explain about Caturing Baseline.
How do I mimic a toggle button?
_____ collection in recordset used to assign a value from textbox to table columns without making abinding in datacontrol.
What is data binding in vb net?
Explain the working of templates?
Is it possible to change menu runtime using API? If yes? Specify the function names.
How would you Create a Query Builder and Explain its uses
How come I get a "No Current Record" error when I use a a Data Control on an empty table?
what is the Difference between Recordset and Querydef?
What is the use of OLE?
How do I make a text box not beep but do something else when I hit the Enter key?
what is the Difference between Dynaset and Snapshot?
What are the types of API Types.
How do I make the mouse cursor invisible/visible?
What is the use of Tabledef?