• DİKKAT

    DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
    Altın Üyelik Hakkında Bilgi

combobox tek basamaklı numara ile arama

  • Konbuyu başlatan Konbuyu başlatan herta
  • Başlangıç tarihi Başlangıç tarihi
Katılım
14 Ocak 2011
Mesajlar
46
Excel Vers. ve Dili
2007
arkadaşlar formda combobox ta arama yaparken diyelimki tek haneli yani 1 i arıyorum ama 11, 12, 112 gibi 1 le başlayanların tamamı geliyor bunu nasıl düzeltirim acaba teşekürler


Kod:
Private Sub ComboBox5_Change()
Dim sat, s As Integer
Dim deg1, deg2 As String
With ListBox1
.Clear
.ColumnCount = 7
.ColumnWidths = "0;45;55;135;65;180;70"




End With
For sat = 3 To Cells(65536, "B").End(xlUp).Row
deg1 = UCase(Replace(Replace(Cells(sat, "B"), "ı", "I"), "i", "İ"))
deg2 = UCase(Replace(Replace(ComboBox5, "ı", "I"), "i", "İ"))
If deg1 Like "*" & deg2 & "*" Then
ListBox1.ListIndex = ListBox1.ListCount - 1
ListBox1.AddItem

ListBox1.List(s, 0) = sat
ListBox1.List(s, 1) = Cells(sat, "B")
ListBox1.List(s, 2) = Cells(sat, "C")
ListBox1.List(s, 3) = Cells(sat, "D")
ListBox1.List(s, 4) = Cells(sat, "E")
ListBox1.List(s, 5) = Cells(sat, "F")
ListBox1.List(s, 6) = Format(Cells(sat, "G"), "##,#0.00 TL")
ListBox1.List(s, 7) = Cells(sat, "A")


Toplam

s = s + 1
End If: Next


End Sub
 
If deg1 Like "*" & deg2 & "*" Then burdaki kodu


If deg1 = deg2 Then olarak değiştirip denermisiniz.
 
dediğin oldu ama bu seferde combobox boşken listbox ın tamamını boş gösteriyor

teşekürler buna bir örnek varmı acaba
 
dediğin oldu ama bu seferde combobox boşken listbox ın tamamını boş gösteriyor

teşekürler buna bir örnek varmı acaba

kodları bu şekilde denermisiniz.

deg2 = UCase(Replace(Replace(combobox5, "ı", "I"), "i", "İ")) altına aşağıdaki if kodlarını yerleştirin.

If combobox5 = "" Then
deg2 = "*"
End If


If deg1 = deg2 Then
 
gerekli yerleri aşağıdaki gibi yapınıp deneyiniz.:cool:
Kod:
End With
deg2 = UCase(Replace(Replace(ComboBox5, "ı", "I"), "i", "İ"))
For sat = 3 To Cells(65536, "B").End(xlUp).Row
deg1 = UCase(Replace(Replace(Cells(sat, "B"), "ı", "I"), "i", "İ"))
If deg2 = "" Then deg2 = deg1
If deg1 = deg2 Then
 
ustalarım ne yazıkki olmuyorr form açılırken yada combobox silince tüm listeyi almıyorum
 
bu defa oldu
kardeşim bu mubarek günde zaman ayırdığınız için çok teşekür ediyorum Orion1kardeşimdenen ve senden ricam linkteki 2 listbox olayı hakkında bir yorum yapmanız olur veya olmaz diye çünkü bu konu hakkında hiç birşey bulamadım o yüzden userformdan ayırmayı düşünüyorum link yine aşağıda

http://www.excel.web.tr/f48/2-listbox-kullanymy-t118160.html#post645713
Benim yazdığımda ayni idi.Nasıl benimki olmuyor?
 
If ComboBox5 = "" Then
deg2 = deg1
End If
If deg1 = deg2 Then

end If farklı sadece ama çok saol sayende çok güzel çalışmam oldu Evren gardaşım hakkını helal et ve linke bir bak
http://www.excel.web.tr/f48/2-listbox-kullanymy-t118160.html#post645713

gerekli yerleri aşağıdaki gibi yapınıp deneyiniz.:cool:
Kod:
End With
deg2 = UCase(Replace(Replace(ComboBox5, "ı", "I"), "i", "İ"))
For sat = 3 To Cells(65536, "B").End(xlUp).Row
deg1 = UCase(Replace(Replace(Cells(sat, "B"), "ı", "I"), "i", "İ"))
If deg2 = "" Then deg2 = deg1
If deg1 = deg2 Then
 
Son düzenleme:
Geri
Üst