M
mwalsh62
Hi,
I've managed to fill a combobox with categories using:
With frmAddItems.combCat
For intCount = 1 To objTemplate.BuildingBlockTypes.Count
Set objBBT = objTemplate.BuildingBlockTypes(intCount)
If objBBT.Categories.Count > 0 Then
For intCountCat = 1 To objBBT.Categories.Count
Set objCat = objBBT.Categories(intCountCat)
.AddItem objCat.Name
Next
End If
Next
End With
But I am having trouble making the next step, selecting a category from the
combobox, and filling a ListBox with the resulting BuildingBlocks. I assume
my problem is integer vs. string, and getting the proper syntax. I've gotten
as far as this:
If objCat.BuildingBlocks.Count > 0 Then
For intCountBBs = 1 To objCat.BuildingBlocks.Count
Set objBBs = objCat.BuildingBlocks(intCountBBs)
I am able to use "1 To 1", for example, and narrow down the list, and return
the right values (in Immediate Window), but I can't quite grasp how to set
combobox value as a variable.
Any help appreciated,
Mike
I've managed to fill a combobox with categories using:
With frmAddItems.combCat
For intCount = 1 To objTemplate.BuildingBlockTypes.Count
Set objBBT = objTemplate.BuildingBlockTypes(intCount)
If objBBT.Categories.Count > 0 Then
For intCountCat = 1 To objBBT.Categories.Count
Set objCat = objBBT.Categories(intCountCat)
.AddItem objCat.Name
Next
End If
Next
End With
But I am having trouble making the next step, selecting a category from the
combobox, and filling a ListBox with the resulting BuildingBlocks. I assume
my problem is integer vs. string, and getting the proper syntax. I've gotten
as far as this:
If objCat.BuildingBlocks.Count > 0 Then
For intCountBBs = 1 To objCat.BuildingBlocks.Count
Set objBBs = objCat.BuildingBlocks(intCountBBs)
I am able to use "1 To 1", for example, and narrow down the list, and return
the right values (in Immediate Window), but I can't quite grasp how to set
combobox value as a variable.
Any help appreciated,
Mike