Two ways: Implements, or late binding. Late binding would probably be easiest. If you cast the Form variables to Object, you can make whatever calls you want to them, and they're not checked at compile time, only at run time, so you can go:
Dim frm As Form
Set frm = FormA 'For example
Dim o As Object
Set o = frm
o.Data1.whatever
And it'll work, provided that FormA really does have a Data1 property.
Implements is perhaps the more correct way of doing things, but much more involved, so I won't go into it 'less you really want.
|