Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Referencing an object from another object in the stack
Message
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00406968
Message ID:
00408981
Views:
11
>>This line doesn't create a new instance. The first line at the top (the Dim line) is there to declare the object variable (no instance is created then). The New keyword creates the instance.
>>
>>To store value in the instance properties, properties must be declared public and you use this syntax:
>>
oApp.Prop1 = "New Value"
>
>Hi Eric,
>
>Thanks for the help. I understand what you are saying. The code ends up doing something like this, though:
>
>
dim oApp as BM_App
>set oApp = New BM_App
>
>oApp.SomeProp = "Hello"
>
>set oApp = New BM_App
>
>When the last line fires, isn't the object oApp replaced?

The last shouldn't be there!
dim oApp as BM_App
set oApp = New BM_App

oApp.SomeProp = "Hello"
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform