I am having a problem with objects. I'll illustrate with a simple problem
'========================================
clsSimple 'this is just a simple class
private prop1 as long
public property let setProp1(m as long)
prop1 = m
end property
public property get getProp1() as long
getProp11 = prop1
end property
'======================
In the program I have:
dim a as clsSimple
dim b as clsSimple
a.setprop1 = 45
set b = a
This is where I am stuck. What the line set b = a does is create a reference to object a. I want to create another instance of it. Basically I want b to have all the values that a has but not to be related to it in any way, How do I do this? Do I have to:
set b = new clsSimple
b.setprop1 = a.getprop1
I have tried:
set b = new clsSimple
set b = a
But that did not work....
Any ideas.... Troy Williams B.Eng.
fenris@hotmail.com
'========================================
clsSimple 'this is just a simple class
private prop1 as long
public property let setProp1(m as long)
prop1 = m
end property
public property get getProp1() as long
getProp11 = prop1
end property
'======================
In the program I have:
dim a as clsSimple
dim b as clsSimple
a.setprop1 = 45
set b = a
This is where I am stuck. What the line set b = a does is create a reference to object a. I want to create another instance of it. Basically I want b to have all the values that a has but not to be related to it in any way, How do I do this? Do I have to:
set b = new clsSimple
b.setprop1 = a.getprop1
I have tried:
set b = new clsSimple
set b = a
But that did not work....
Any ideas.... Troy Williams B.Eng.
fenris@hotmail.com