Link to home
Start Free TrialLog in
Avatar of zzconsumer
zzconsumer

asked on

Something like a Pointer

Hello,

I need something like a pointer to tell a class module where to get its data from. Is there such a possibility in Visual Basic?

Gretting
zz

Avatar of CJ_S
CJ_S
Flag of Netherlands image

ByRef

in your class module you make a function like

public function myFunction(ByRef myData as string)
   msgbox myData
   myData = "Newstring"
end function

now you just pass the reference like

Dim str as string
str = "test"
call objectreference.myFunction(str)
msgbox str

Regards,
CJ
ASKER CERTIFIED SOLUTION
Avatar of Ark
Ark
Flag of Russian Federation image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of zzconsumer
zzconsumer

ASKER

Can i also tell the class which Property of a known class to allocate? The thing is that I made a class that returns arrays using different Properties as Variant.
Well, I had not time to check it out, but Ark's solution looks like it comes closest to what I need.

Thanks.
zz