var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Run code on each item in combo box
Can someone tell me the best method to run a line of code on each item in a combo box.
When I click on something in the combo box it will assign a value to a textbox, but that value can change depending on what is clicked in the combo box.
I tried using a Select Case statement and use Case 1, 2...etc for each item in the combo box, but it seems I can't use that with the combo box.
So what's the best method?
forgot, you can use myCombo.ListIndex to get ahold of the currently selected item. Remember, it's zero-based...
Dim i As Integer
For i = 0 To myCombo.ListCount - 1
'do some stuff like
MsgBox myCombo.Column(0, i)
Last edited by Teddy; 09-26-06 at
I did managed to use a Select Case statement in the end.
It seems if you just specify the combo box control name it doesn't work, but if you use the ListIndex property it does pick it up.
And as you said because it is zero-based the first case wil be 0, instead of 1.