Wierd (Scope?) Class problem
Okay, I have a really interesting problem that I can't figure out!
I have a public class defined as CObjects, a globally accessable array Objs() (variable upper bound) and a function:
(Assume that Objs(1) holds something)
public sub OSet()
dim O as new Cobjects
dim O2 as new cobjects
o = Objs(1)
O2 = objs(1)
O.AProperty = 5
end sub
Now the problem:
Changing the variable O ALSO changes the Variable O2 AND the entry in the Objs() array. :confused:
As you can see the only interaction between variables is when O and O2 are being set to Objs(1).
I can't continue much further without this being answered, please help :)