Results 1 to 4 of 4

Thread: Passing values

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2004
    Location
    Cleveland,Oh
    Posts
    95

    Passing values

    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
    Zus

  2. #2
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961
    I would try making a Public Get Property on the form that will share the object like this:

    VB Code:
    1. Option Explicit
    2.  
    3. Private m_colFields As Collection
    4. '
    5. '
    6.  
    7. Public Property Get Fields() As Collection
    8.     Set Fields = m_colFields
    9. End Property

  3. #3
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950
    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?

  4. #4

    Thread Starter
    Lively Member
    Join Date
    May 2004
    Location
    Cleveland,Oh
    Posts
    95

    resolved:passing values

    Thanks all for helping me.

    Zus

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width