Results 1 to 3 of 3

Thread: Pass ComboBox to class?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2002
    Posts
    93

    Pass ComboBox to class?

    In a class module (Segment) I have:
    Code:
    Public Sub AddOutcomes(ByRef cmbRef As ComboBox, ByVal strWinner As String)
      cmbRef.AddItem strWinner & " blah blah", 0
      ...
      cmbRef.AddItem strWinner & " more blah blah", 10
    End Sub
    and in my form I have:
    Code:
    segInfo.AddOutcomes cmbFinish, cmbOutcome.Text
    [edit]
    Code:
    Dim segInfo As Segment
    [/edit]

    but I get "Object Variable or With block variable not set" errors on the segInfo.AddOutcomes line, what am I missing?
    Last edited by thetakerfan; Aug 25th, 2003 at 07:49 PM.

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Jul 2002
    Posts
    93
    yes, I forgot to put it in the post, but its there now.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jul 2002
    Posts
    93
    nevermind, I got it

    Set segInfo = New Segment

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