What is the diff between the Create Object and Get object?
Answers were Sorted based on User's Feedback
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 |
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 |
How do I set the Windows wallpaper at runtime?
State about the different types of visual basic data?
What is ActiveX Document?
Hai! , i make a project for browsing center using vb6.0 , at the time of running below mentioned error is occured so please help me for solve this problem. Error : Can't find project or library
How to get freefile location in memory?
what is the Default property of datacontrol ?
Explain OLE Drag and Drop.
How can you filter out specific type of file using file system controls?
What are the rules which should be followed while naming a variable in VB?
Difference between Class Module and Standard Module?
What can you do with visual basic?
How many max. number of controls can place in one form (especially visual basic form)?