Hi Jamie,
My comment about the UserForm being an object module was that there is no
need to "pretend" its like an object module since it is one. Rob is using it
correctly It's just a special type of class module.
I might try the idea of using a class object in lieu of a type and let you
know how it goes. I am writing VBA code against a set of custom COM
components, but the data type I am having the problem with is used purely
within the VBA world, so I have the freedom to change it to a VBA class
instead. Good thinking and I'll let you know how it goes.
Cheers,
Wayne.
"Jamie Collins" wrote in message
om...
"David Battams" wrote ...
There's no "treating" a UserForm class as an object module. It IS an
object
module.
I think Rob meant he uses a userform as he would a class e.g. add
public members to the userform rather than use public variables in a
standard module etc.
KeepItCool - what do you mean what is the point? I presume hard crashes
are
a feature in your code? :-)
I think KeepItCool meant he usually instantiates a userform with
Load UserForm1
(which is reasonable if you only need one instance) and wasn't waare
he could you could do the same with
Dim frm1 As UserForm1
Set frm1 = New UserForm1
David, untested but if you replace the struct (MY_DATA_TYPE) with a
complex object (a VB class) I think the problem would go away. That's
what I mean by the struct being the problem. But something tells me
you need the struct for an external app...?
Jamie.
--