Filling two combox boxes with two lists |
Post Reply |
Author | |
blockwood
Groupie Joined: 23 March 2004 Status: Offline Points: 45 |
Post Options
Thanks(0)
Posted: 27 March 2004 at 8:29pm |
I have the code to fill comboboxes with a list and it works great.
But if you have two combo boxes i can't work with them in a granular way. is there a way to explicitly reference one combo box - fill it with a list, and then reference the next and fill it with a different list? this code: If ICmdBar.Position = xtpBarListBox Then If (Not ICmdBar.Parent Is Nothing) And (ICmdBar.Parent.Type = xtpControlComboBox) Then Set ControlComboBox = ICmdBar.Parent 'return ComboBox control strText = ControlComboBox.Text &nbs p; 'store current text ControlComboBox.Clear For i = 0 To cmbCommands.ListCount - 1 ControlComboBox.AddItem cmbCommands.List(i) Next IndexCurrent = ControlComboBox.FindItem(strText) If (IndexCurrent > 0) Then ControlComboBox.ListIndex = IndexCurrent 'restore curretn text End If End If references and populates the "Parent" - i need the specific control like it does for filemenu and the button - drop down. it seems as if combo box is populated differently. TIA |
|
blockwood
Groupie Joined: 23 March 2004 Status: Offline Points: 45 |
Post Options
Thanks(0)
|
got it. added 2 combo boxes (cmbCommands and cmbCommands2) and reference them via ID property &nbs p;
If ControlComboBox.Id = ID_MASTER_SERVER Then Set cbo = cmbCommands Else Set cbo = cmbCommands2 End If |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |