- Katılım
- 4 Ekim 2004
- Mesajlar
- 155
selamlar..
Private Sub ComboBox2_Change()
If ComboBox2.Value = "YURTICI" Then
Label29.Visible = True: TextBox21.Visible = True: CommandButton8.Visible = True: ComboBox9.MaxLength = 13
For w = 2 To Sheets("YURTICI").Cells(65536, 1).End(xlUp).Row
If WorksheetFunction.CountIf(Worksheets("YURTICI").Range("C2:C" & w), Sheets("YURTICI").Cells(w, 3)) = 1 Then ComboBox8.AddItem Sheets("YURTICI").Cells(w, 3).Value
Next
ComboBox8.List = ListSort(ComboBox8.List)
For a = 2 To Sheets("YURTICI").Cells(65536, 1).End(xlUp).Row
If WorksheetFunction.CountIf(Worksheets("YURTICI").Range("B2:B" & a), Sheets("YURTICI").Cells(a, 2)) = 1 Then ComboBox9.AddItem Sheets("YURTICI").Cells(a, 2).Value
Next
ComboBox9.List = ListSort(ComboBox9.List)
" buraya KADAR KODLAR ÇALIÃIYOR" SORUN YOK, tEKRAR YOK
ElseIf ComboBox2.Value <> "YURTICI" Then ' sORUN bU kısımda TextBox21.Value = "": Label29.Visible = False: TextBox21.Visible = False: CommandButton8.Visible = True: ComboBox9.MaxLength = 12
For l = 2 To Sheets("2.SINIF").Cells(65536, 1).End(xlUp).Row
If WorksheetFunction.CountIf(Worksheets("2.SINIF").Range("C2:C" & l), Sheets("2.SINIF").Cells(l, 3)) = 1 Then ComboBox8.AddItem Sheets("2.SINIF").Cells(l, 3).Value
Next
ComboBox8.List = ListSort(ComboBox8.List)
For n = 2 To Sheets("2.SINIF").Cells(65536, 1).End(xlUp).Row
If WorksheetFunction.CountIf(Worksheets("2.SINIF").Range("B2:B" & n), Sheets("2.SINIF").Cells(n, 2)) = 1 Then ComboBox9.AddItem Sheets("2.SINIF").Cells(n, 2).Value
ComboBox9.AddItem Sheets("2.SINIF").Cells(n, 2).Value
Next
ComboBox9.List = ListSort(ComboBox9.List)
End If " BU KISIMDA ROW SOURCE DA TEKRARLAMA VAR, OLMAMASI GEREK? :kafa:
End Sub
Private Sub ComboBox2_Change()
If ComboBox2.Value = "YURTICI" Then
Label29.Visible = True: TextBox21.Visible = True: CommandButton8.Visible = True: ComboBox9.MaxLength = 13
For w = 2 To Sheets("YURTICI").Cells(65536, 1).End(xlUp).Row
If WorksheetFunction.CountIf(Worksheets("YURTICI").Range("C2:C" & w), Sheets("YURTICI").Cells(w, 3)) = 1 Then ComboBox8.AddItem Sheets("YURTICI").Cells(w, 3).Value
Next
ComboBox8.List = ListSort(ComboBox8.List)
For a = 2 To Sheets("YURTICI").Cells(65536, 1).End(xlUp).Row
If WorksheetFunction.CountIf(Worksheets("YURTICI").Range("B2:B" & a), Sheets("YURTICI").Cells(a, 2)) = 1 Then ComboBox9.AddItem Sheets("YURTICI").Cells(a, 2).Value
Next
ComboBox9.List = ListSort(ComboBox9.List)
" buraya KADAR KODLAR ÇALIÃIYOR" SORUN YOK, tEKRAR YOK
ElseIf ComboBox2.Value <> "YURTICI" Then ' sORUN bU kısımda TextBox21.Value = "": Label29.Visible = False: TextBox21.Visible = False: CommandButton8.Visible = True: ComboBox9.MaxLength = 12
For l = 2 To Sheets("2.SINIF").Cells(65536, 1).End(xlUp).Row
If WorksheetFunction.CountIf(Worksheets("2.SINIF").Range("C2:C" & l), Sheets("2.SINIF").Cells(l, 3)) = 1 Then ComboBox8.AddItem Sheets("2.SINIF").Cells(l, 3).Value
Next
ComboBox8.List = ListSort(ComboBox8.List)
For n = 2 To Sheets("2.SINIF").Cells(65536, 1).End(xlUp).Row
If WorksheetFunction.CountIf(Worksheets("2.SINIF").Range("B2:B" & n), Sheets("2.SINIF").Cells(n, 2)) = 1 Then ComboBox9.AddItem Sheets("2.SINIF").Cells(n, 2).Value
ComboBox9.AddItem Sheets("2.SINIF").Cells(n, 2).Value
Next
ComboBox9.List = ListSort(ComboBox9.List)
End If " BU KISIMDA ROW SOURCE DA TEKRARLAMA VAR, OLMAMASI GEREK? :kafa:
End Sub