- Katılım
- 16 Nisan 2009
- Mesajlar
- 31
- Excel Vers. ve Dili
- office 2013
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Private Sub ComboBox13_Change()
Dim MALZEME As New Collection, S1 As Worksheet, X As Long, Veri As Range
Set S1 = Sheets("Sayfa1")
On Error Resume Next
For X = 2 To S1.[C65536].End(xlUp).Row
If Cells(X, 3) = ComboBox5 And Cells(X, 4) = ComboBox13 Then MALZEME.Add S1.Cells(X, 5), CStr(S1.Cells(X, 5))
Next
ComboBox14.Clear
For Each Veri In MALZEME
ComboBox14.AddItem Veri
Next
End Sub
Private Sub ComboBox14_Change()
Dim S1 As Worksheet, BUL As Range, ADRES As String
Set S1 = Sheets("Sayfa1")
Set BUL = S1.Range("E:E").Find(ComboBox14, LookAt:=xlWhole)
If Not BUL Is Nothing Then
ADRES = BUL.Address
Do
If S1.Cells(BUL.Row, 3) = ComboBox5 And S1.Cells(BUL.Row, 4) = ComboBox13 Then TextBox17 = S1.Cells(BUL.Row, 6)
TextBox17 = Replace(TextBox17, ".", ",")
If TextBox17 <> "" Then Exit Do
Set BUL = S1.Range("E:E").FindNext(BUL)
Loop While Not BUL Is Nothing And BUL.Address <> ADRES
End If
End Sub
Private Sub ComboBox5_Change()
Dim CİNS As New Collection, S1 As Worksheet, X As Long, Veri As Range
Set S1 = Sheets("Sayfa1")
On Error Resume Next
For X = 2 To S1.[C65536].End(xlUp).Row
If Cells(X, 3) = ComboBox5 Then CİNS.Add S1.Cells(X, 4), CStr(S1.Cells(X, 4))
Next
ComboBox13.Clear
For Each Veri In CİNS
ComboBox13.AddItem Veri
Next
End Sub
Private Sub CommandButton3_Click()
Dim KAYIT As Long
KAYIT = ListBox2.ListCount
ListBox2.ColumnCount = 4
ListBox2.AddItem
ListBox2.List(KAYIT, 0) = ComboBox5
ListBox2.List(KAYIT, 1) = ComboBox13
ListBox2.List(KAYIT, 2) = ComboBox14
ListBox2.List(KAYIT, 3) = TextBox17
End Sub
Private Sub CommandButton4_Click()
On Error Resume Next
ListBox2.RemoveItem (ListBox2.ListCount - 1)
End Sub
Private Sub UserForm_Initialize()
Dim BİRİM As New Collection, S1 As Worksheet, X As Long, Veri As Range
Set S1 = Sheets("Sayfa1")
On Error Resume Next
For X = 2 To S1.[C65536].End(xlUp).Row
BİRİM.Add S1.Cells(X, 3), CStr(S1.Cells(X, 3))
Next
ComboBox5.Clear
For Each Veri In BİRİM
ComboBox5.AddItem Veri
Next
End Sub