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
Can you create a Updatecascade, Deletecascade relation in Ms- Access?
___ is a property to resize a label control according to your caption.
Where can I get updated VB and other Microsoft files?
Why do I get "object not an array" when I try reference the fields of a global object variable which I have set to a table?
What is datagrid in vb net?
Write the steps in Creating ActiveX Dll and Active Exe?
How do I add a form in visual basic?
by writing MACRO CODE,i want to retrive data from one spead sheet to another UI (workbook). control will search cell by cell for each row and load the data in another workbook(UI). ex: custdetails custname lastname locaton mobile pincode custdetails raj tony hyd 555555 521245 servcreqrd srvce# srvcename location srvcepincode servcreqrd 754 drilling hyd 521784 for the above example in the another workbook retrive data like this custname Raj srvce# 754 srvcepincode 521784. while retrieving data control will search cell by cell for each row.
How many File System Controls are there Explain?
Maximum Control Names length?
Is there a way to break long lines in VB code?
How do I create a window with a small title bar as in a floating toolbar?
Why can't I use an index with my VB accessed database?
What are the new events in textbox that has been included in VB ?
Types of cursors in RDO.