- Katılım
- 11 Ağustos 2005
- Mesajlar
- 239
arkadaşlar aşağıdaki kodda listbox1 e veriler sayfa 1 den geliyor isteğim şu sayfa 1 yerine liste isimli sayfadan gelsin sayfa1 olanları liste olarak değiştirdim ama hata veriyor
Private Sub ListBox1_Click()
TextBox1 = ListBox1.List(ListBox1.ListIndex, 0)
End Sub
Private Sub TextBox1_Change()
With ListBox1
.ColumnCount = 1
.ColumnWidths = "65;"
End With
ListBox1.Clear
For suz = 2 To WorksheetFunction.CountA([sayfa1!b1:b65536])
alan = UCase(Replace(Replace(Sayfa1.Range("b" & suz), "j", "J"), "k", "K"))
veri = UCase(Replace(Replace(TextBox1, "j", "J"), "k", "K"))
If alan Like "*" & veri & "*" Then
ListBox1.AddItem
ListBox1.List(s, 0) = Sayfa1.Range("B" & suz)
s = s + 1
End If
Next
End Sub
Private Sub UserForm_Initialize()
For i = 1 To Sheets("Sayfa1").Cells(65536, 1).End(xlUp).Row
If WorksheetFunction.CountIf(Sheets("Sayfa1").Range("c2:c" & i), Sheets("Sayfa1").Cells(i, 3)) = 1 Then
For j = 1 To 18
Controls("ComboBox" & j).AddItem Sheets("Sayfa1").Cells(i, 3)
Next
End If
Next i
TextBox1 = "."
TextBox1 = ""
End Sub
Private Sub ListBox1_Click()
TextBox1 = ListBox1.List(ListBox1.ListIndex, 0)
End Sub
Private Sub TextBox1_Change()
With ListBox1
.ColumnCount = 1
.ColumnWidths = "65;"
End With
ListBox1.Clear
For suz = 2 To WorksheetFunction.CountA([sayfa1!b1:b65536])
alan = UCase(Replace(Replace(Sayfa1.Range("b" & suz), "j", "J"), "k", "K"))
veri = UCase(Replace(Replace(TextBox1, "j", "J"), "k", "K"))
If alan Like "*" & veri & "*" Then
ListBox1.AddItem
ListBox1.List(s, 0) = Sayfa1.Range("B" & suz)
s = s + 1
End If
Next
End Sub
Private Sub UserForm_Initialize()
For i = 1 To Sheets("Sayfa1").Cells(65536, 1).End(xlUp).Row
If WorksheetFunction.CountIf(Sheets("Sayfa1").Range("c2:c" & i), Sheets("Sayfa1").Cells(i, 3)) = 1 Then
For j = 1 To 18
Controls("ComboBox" & j).AddItem Sheets("Sayfa1").Cells(i, 3)
Next
End If
Next i
TextBox1 = "."
TextBox1 = ""
End Sub