Hi All:
I need to pass an object from form1 to form2. How can I go about doing this?
For example:
Dim oLst As Listbox
Load Form2 (oLst) "this cause an error for me.
Thansk
Printable View
Hi All:
I need to pass an object from form1 to form2. How can I go about doing this?
For example:
Dim oLst As Listbox
Load Form2 (oLst) "this cause an error for me.
Thansk
I would try making a Public Get Property on the form that will share the object like this:
VB Code:
Option Explicit Private m_colFields As Collection ' ' Public Property Get Fields() As Collection Set Fields = m_colFields End Property
What is "Load Form2(oLst)" supposed to do? I've never seen a load statement like that.
Why not create the listbox in the Load event of Form2?
Thanks all for helping me.
:thumb: :thumb: