|
|
 |
Re: FN-FORUM: Access XP Class Modules
date posted 8th March 2006 21:32
I'm not sure I follow the detail of what you're asking here.
You're using VB.Net ?
You want to be able to see the value of a property but you don't
necessarily know that the property exists?
If you are using .net you can probably do it using Reflection, but if
you are responsible for the architecture on both sides of the call think
very hard about whether you want to...
-ben
Nicholas Smith wrote:
>Hi all,
>
>I'm not sure if this can be done but I'll ask anyway:
>
>I want to reference Property's in a Class Module by calling them using a
>variable.
>
>Eg:
>
>Class Module code
>
>Property Get Name() As String
> Name = mstrName
>End Property
>
>Module Code
>
>Public Sub GetData()
> dim obj As clsClassModule
> dim str As String
>
> str = "Name"
> Debug.Print obj(str)
>End Sub
>
>This code wont work os you cant have obj(str), so is there a way of
>referencing properties like this?
>
>Nic
>
>
>
>
|
 |
|