Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is diference between createobject() and Getobject()
Message
De
10/04/2002 05:21:20
 
 
À
10/04/2002 05:03:17
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Divers
Thread ID:
00643051
Message ID:
00643055
Vues:
11
both functions are used for assigning object reference.
however createObject function creates new object
while the GetObject function is mostly used to assign a reference to existing object though you can also create new obects with it.
Dim xlApp As Excel.Application
'if excel is running then
Set xlApp = GetObject(,"Excel.Application") 'xlApp references existing obj
Set xlApp = GetObject("","Excel.Application") 'xlApp references new object
'if excel is not running then
Set xlApp = GetObject(,"Excel.Application") 'give Error
Set xlApp = GetObject("","Excel.Application") 'start the excel and xlApp references new object
Best Luck..
Nilesh
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform