ok, so i used the code below to fill a list box:
well, not exactly; the "oIngredient.Type = previoustype" needs to be replaced with something that will look through the array being filled and return true if it finds a duplicate.![]()
Private Sub UserForm_Initialize() Dim oIngredient As Ingredient Dim oIngredients As New Ingredients Dim avIngredients() As Variant Dim i As Integer For i = 1 To oIngredients.Count Set oIngredient = oIngredients.Item(i) avIngredients(i) = oIngredient.IngredientType If oIngredient.IngredientType= previoustype Then ' need something here GoTo Skip Else Me.lstPreDefinedTypes.AddItem (CStr(oIngredient.IngredientType)) End If Skip: Next i End Sub
is there a way to do this?
thanks ahead of time,
sven
Bookmarks