I have created a class module, and my program creates many instances of the class. Each object has a lot of data, and I want to be able to create a new instance that is a copy of an existing instance. I can't figure out a automatic way to do it with Visual Basic 6. In .Net I think there is some command called "DirectCast", but of course that is no help anyways.
Tekito
0
Junior Poster in Training
Recommended Answers
Jump to PostYou will need to serialize the object class and then consume the serialized data from the new object.
Jump to PostYou should search on "PropertyBag".
You can find an XML implementation here, but you should also understand the basics of the PropertyBag itself.
http://www.vbaccelerator.com/codelib/xml/xmlpbag.htm
Jump to PostHere is a MSDN article for you.
http://msdn.microsoft.com/en-us/library/aa263542(VS.60).aspx
See the topics:
1. Using the PropertyBag Object to Persist an Object
2. Depersisting An ObjectYou can use the code …
All 9 Replies
techtix
2
Light Poster
Tekito
commented:
ingenious idea
+1
Tekito
0
Junior Poster in Training
techtix
2
Light Poster
techtix
2
Light Poster
Tekito
0
Junior Poster in Training
techtix
2
Light Poster
Tekito
0
Junior Poster in Training
techtix
2
Light Poster
Tekito
0
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.