-
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?
-
yes, I forgot to put it in the post, but its there now.
-
nevermind, I got it
Set segInfo = New Segment