30/11/2008, 03:07
chopper07
formumuza bir adet combobox ve altına yada yanına bir adet textbox koyalım ve kodları yapıştıralım.
Kod:
Option Explicit
Dim plaka As Byte
Private Sub Form_Load()
Combo1.AddItem "ADANA"
Combo1.AddItem "ADIYAMAN"
Combo1.AddItem "AFYON"
Combo1.AddItem "AĞRI"
Combo1.AddItem "AMASYA"
Combo1.AddItem "ANKARA"
Combo1.AddItem "ANTALYA"
Combo1.AddItem "ARTVİN"
Combo1.AddItem "AYDIN"
Combo1.AddItem "BALIKESİR"
Combo1.AddItem "BİLECİK"
Combo1.AddItem "BİNGÖL"
Combo1.AddItem "BİTLİS"
Combo1.AddItem "BOLU"
Combo1.AddItem "BURDUR"
Combo1.AddItem "BURSA"
Combo1.AddItem "ÇANAKKALE"
Combo1.AddItem "ÇANKIRI"
Combo1.AddItem "ÇORUM"
Combo1.AddItem "DENİZLİ"
Combo1.AddItem "DİYARBAKIR"
Combo1.AddItem "EDİRNE"
Combo1.AddItem "ELAZIĞ"
Combo1.AddItem "ERZİNCAN"
Combo1.AddItem "ERZURUM"
Combo1.AddItem "ESKİŞEHİR"
Combo1.AddItem "GAZİANTEP"
Combo1.AddItem "GİRESUN"
Combo1.AddItem "GÜMÜŞHANE"
Combo1.AddItem "HAKKARİ"
Combo1.AddItem "HATAY"
Combo1.AddItem "ISPARTA"
Combo1.AddItem "İÇEL"
Combo1.AddItem "İSTANBUL"
Combo1.AddItem "İZMİR"
Combo1.AddItem "KARS"
Combo1.AddItem "KASTAMONU"
Combo1.AddItem "KAYSERİ"
Combo1.AddItem "KIRKLARELİ"
Combo1.AddItem "KIRŞEHİR"
Combo1.AddItem "KOCAELİ"
Combo1.AddItem "KONYA"
Combo1.AddItem "KÜTAHYA"
Combo1.AddItem "MALATYA"
Combo1.AddItem "MANİSA"
Combo1.AddItem "KAHRAMAN MARAŞ"
Combo1.AddItem "MARDİN"
Combo1.AddItem "MUĞLA"
Combo1.AddItem "MUŞ"
Combo1.AddItem "NEVŞEHİR"
Combo1.AddItem "NİĞDE"
Combo1.AddItem "ORDU"
Combo1.AddItem "RİZE"
Combo1.AddItem "SAKARYA"
Combo1.AddItem "SAMSUN"
Combo1.AddItem "SİİRT"
Combo1.AddItem "SİNOP"
Combo1.AddItem "SİVAS"
Combo1.AddItem "TEKİRDAĞ"
Combo1.AddItem "TOKAT"
Combo1.AddItem "TRABZON"
Combo1.AddItem "TUNCELİ"
Combo1.AddItem "ŞANLIURFA"
Combo1.AddItem "UŞAK"
Combo1.AddItem "VAN"
Combo1.AddItem "YOZGAT"
Combo1.AddItem "ZONGULDAK"
Combo1.AddItem "AKSARAY"
Combo1.AddItem "BAYBURT"
Combo1.AddItem "KARAMAN"
Combo1.AddItem "KIRIKKALE"
Combo1.AddItem "BATMAN"
Combo1.AddItem "ŞIRNAK"
Combo1.AddItem "BARTIN"
Combo1.AddItem "ARDAHAN"
Combo1.AddItem "IĞDIR"
Combo1.AddItem "YALOVA"
Combo1.AddItem "KARABÜK"
Combo1.AddItem "KİLİS"
Combo1.AddItem "OSMANİYE"
Combo1.AddItem "DÜZCE"
Combo1.ListIndex = 29
End Sub
Private Sub Combo1_Click()
plaka = Combo1.ListIndex + 1
Text1 = plaka
End Sub