Well, you probably do it in comboboxblockname_SelectedIndexChanged event handler, something like this (i.e. add following subroutine in the event handler and pass the comboboxbloxkname.Text in):
Private Sub ListBlockAttribute(blockName As string)
Dim attNames As New List(of String)()
Using tran As Transaction.......
Dim bt As BlockTable = ....''Get blockTable from db
''We do not have to test if the block with the name exists in block table and if the block has attribute or not
''because we have already done that when loading the block combobox.
Dim blk As BlockTableRecord = tran.GetObject(bt(blockName), OpenMode.ForRead)
For Each id As ObjectId in blk
Dim att As AttributeDefinition=TryCast(tran.GetObject(id, OpenMode.ForRead), AttributeDefinition)
If att IsNot Nothing Then attNames.Add(att.Tag)
Next
End Using
''Now you can use the list to populate the other combobox
comboboxAttribute.Items.Clear()
If (attName.Count=0)
comboboxAttribute.Enabled=False
Else
comboboxAttribute.Enabled=True
For Each att As String in attNames
comboboxAttribute.Items.Add(att)
Next
End If
End Sub