Hi,
I have a ComboBox which is filled with 66 items on form_load event:
Private Sub Form_Load()
Combo1.AddItem "Tekvin" 'item number: 1
Combo1.AddItem "Cikis" 'item number: 2
Combo1.AddItem "Levililer" '....
Combo1.AddItem "Sayilar"
...
Combo1.AddItem "Vahiy" 'item number:66
End sub
When user selects one of them, beside this control in 4 diff. Label
(InfoLbl) controls the app
shows the description of the item selected:
Private Sub Combo1_Click()
If Combo1.Text = "Tekvin" Then
InfoLbl1.Caption = "Musa"
InfoLbl2.Caption = "Col"
InfoLbl3.Caption = "M.O. 1513"
InfoLbl4.Caption = "Yaradilistan M.O. 1657'ye kadar"
End If
...
...
'this means for 66 items = 66 conditions..
End sub
As I'm a beginner, I do not know whether this code is good. Is there another
way of doing the same thing, more advanced, or much faster? (For ex.: Select
Case, is it better?) If yes what is the optimized way?
Thanks in advance!
--
Cengiz Ulku
ce*****@bluewin.ch