Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dim MyObject As New ... vs. Set MyObject = New ...
Message
De
26/08/1999 17:29:12
 
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Titre:
Dim MyObject As New ... vs. Set MyObject = New ...
Divers
Thread ID:
00258165
Message ID:
00258165
Vues:
48
Can anyone tell me what difference there is (other than 1 line of code) between using the New keyword in a Dim statement, or in a Set statement? For instance:

Public Sub MyFunc()
Dim MyObject1 As New MyClass()
Dim MyObject2 As MyClass()

'Class Instance Created Here for MyObject1
MyObject1.MyValue = "Some Value"

'Class Instance Created Here for MyObject2
Set MyObject2 = New MyClass
MyObject2.MyValue = "Some Other Value"
End Sub

Thanks,
-Mike
--------------------------
Michael Koepke, Consultant
Nims Associates, Inc.
mkkoepke@aol.com
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform